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
d99cb30a
Commit
d99cb30a
authored
Feb 19, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Take the extent lock before dropping the delalloc bits
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
5e591a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
fs/btrfs/file.c
fs/btrfs/file.c
+4
-0
No files found.
fs/btrfs/file.c
View file @
d99cb30a
...
@@ -765,9 +765,13 @@ static int prepare_pages(struct btrfs_root *root, struct file *file,
...
@@ -765,9 +765,13 @@ static int prepare_pages(struct btrfs_root *root, struct file *file,
if
(
start_pos
<
inode
->
i_size
)
{
if
(
start_pos
<
inode
->
i_size
)
{
u64
last_pos
;
u64
last_pos
;
last_pos
=
(
index
+
num_pages
)
<<
PAGE_CACHE_SHIFT
;
last_pos
=
(
index
+
num_pages
)
<<
PAGE_CACHE_SHIFT
;
lock_extent
(
&
BTRFS_I
(
inode
)
->
io_tree
,
start_pos
,
last_pos
-
1
,
GFP_NOFS
);
clear_extent_bits
(
&
BTRFS_I
(
inode
)
->
io_tree
,
start_pos
,
clear_extent_bits
(
&
BTRFS_I
(
inode
)
->
io_tree
,
start_pos
,
last_pos
-
1
,
EXTENT_DIRTY
|
EXTENT_DELALLOC
,
last_pos
-
1
,
EXTENT_DIRTY
|
EXTENT_DELALLOC
,
GFP_NOFS
);
GFP_NOFS
);
unlock_extent
(
&
BTRFS_I
(
inode
)
->
io_tree
,
start_pos
,
last_pos
-
1
,
GFP_NOFS
);
}
}
return
0
;
return
0
;
}
}
...
...
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