Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
211f90e6
Commit
211f90e6
authored
Jul 18, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Don't allow releasepage to succeed if EXTENT_ORDERED is set
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
3edf7d33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
fs/btrfs/extent_io.c
fs/btrfs/extent_io.c
+2
-1
fs/btrfs/inode.c
fs/btrfs/inode.c
+9
-5
No files found.
fs/btrfs/extent_io.c
View file @
211f90e6
...
...
@@ -2542,7 +2542,8 @@ int try_release_extent_state(struct extent_map_tree *map,
u64
end
=
start
+
PAGE_CACHE_SIZE
-
1
;
int
ret
=
1
;
if
(
test_range_bit
(
tree
,
start
,
end
,
EXTENT_IOBITS
,
0
))
if
(
test_range_bit
(
tree
,
start
,
end
,
EXTENT_IOBITS
|
EXTENT_ORDERED
,
0
))
ret
=
0
;
else
{
if
((
mask
&
GFP_NOFS
)
==
GFP_NOFS
)
...
...
fs/btrfs/inode.c
View file @
211f90e6
...
...
@@ -477,10 +477,8 @@ printk("queueing worker to fixup page %lu %Lu\n", inode->i_ino, page_offset(page
return
-
EAGAIN
;
}
int
btrfs_writepage_end_io_hook
(
struct
page
*
page
,
u64
start
,
u64
end
,
struct
extent_state
*
state
,
int
uptodate
)
static
int
btrfs_finish_ordered_io
(
struct
inode
*
inode
,
u64
start
,
u64
end
)
{
struct
inode
*
inode
=
page
->
mapping
->
host
;
struct
btrfs_root
*
root
=
BTRFS_I
(
inode
)
->
root
;
struct
btrfs_trans_handle
*
trans
;
struct
btrfs_ordered_extent
*
ordered_extent
;
...
...
@@ -550,6 +548,12 @@ int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end,
return
0
;
}
int
btrfs_writepage_end_io_hook
(
struct
page
*
page
,
u64
start
,
u64
end
,
struct
extent_state
*
state
,
int
uptodate
)
{
return
btrfs_finish_ordered_io
(
page
->
mapping
->
host
,
start
,
end
);
}
int
btrfs_readpage_io_hook
(
struct
page
*
page
,
u64
start
,
u64
end
)
{
int
ret
=
0
;
...
...
@@ -2663,8 +2667,8 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset)
clear_extent_bit
(
tree
,
page_start
,
page_end
,
EXTENT_DIRTY
|
EXTENT_DELALLOC
|
EXTENT_LOCKED
,
1
,
0
,
GFP_NOFS
);
btrfs_
writepage_end_io_hook
(
page
,
page_star
t
,
page_end
,
NULL
,
1
);
btrfs_
finish_ordered_io
(
page
->
mapping
->
hos
t
,
page_start
,
page_end
);
btrfs_put_ordered_extent
(
ordered
);
lock_extent
(
tree
,
page_start
,
page_end
,
GFP_NOFS
);
}
...
...
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