Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
61295eb8
Commit
61295eb8
authored
Jan 14, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Add drop inode func to avoid data=ordered deadlock
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
8c416c9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+1
-0
fs/btrfs/inode.c
fs/btrfs/inode.c
+19
-0
fs/btrfs/super.c
fs/btrfs/super.c
+1
-0
No files found.
fs/btrfs/ctree.h
View file @
61295eb8
...
...
@@ -1144,6 +1144,7 @@ int btrfs_check_free_space(struct btrfs_root *root, u64 num_required,
int
btrfs_page_mkwrite
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
);
int
btrfs_readpage
(
struct
file
*
file
,
struct
page
*
page
);
void
btrfs_delete_inode
(
struct
inode
*
inode
);
void
btrfs_drop_inode
(
struct
inode
*
inode
);
void
btrfs_read_locked_inode
(
struct
inode
*
inode
);
int
btrfs_write_inode
(
struct
inode
*
inode
,
int
wait
);
void
btrfs_dirty_inode
(
struct
inode
*
inode
);
...
...
fs/btrfs/inode.c
View file @
61295eb8
...
...
@@ -990,6 +990,25 @@ out:
fail:
return
err
;
}
void
btrfs_drop_inode
(
struct
inode
*
inode
)
{
struct
btrfs_trans_handle
*
trans
;
struct
btrfs_root
*
root
=
BTRFS_I
(
inode
)
->
root
;
if
(
!
BTRFS_I
(
inode
)
->
ordered_trans
)
{
generic_drop_inode
(
inode
);
return
;
}
/* nasty, but it prevents a deadlock with data=ordered by preventing
* a commit until after this inode is done
*/
trans
=
btrfs_start_transaction
(
root
,
1
);
generic_drop_inode
(
inode
);
/* note, the inode is now untouchable */
btrfs_end_transaction
(
trans
,
root
);
}
void
btrfs_delete_inode
(
struct
inode
*
inode
)
{
struct
btrfs_trans_handle
*
trans
;
...
...
fs/btrfs/super.c
View file @
61295eb8
...
...
@@ -425,6 +425,7 @@ static struct file_system_type btrfs_fs_type = {
static
struct
super_operations
btrfs_super_ops
=
{
.
delete_inode
=
btrfs_delete_inode
,
.
drop_inode
=
btrfs_drop_inode
,
.
put_super
=
btrfs_put_super
,
.
read_inode
=
btrfs_read_locked_inode
,
.
write_super
=
btrfs_write_super
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment