projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1ed835
)
Btrfs: fix btrfs page_mkwrite to return locked page
author
Chris Mason
<chris.mason@oracle.com>
Fri, 11 Sep 2009 16:33:12 +0000
(12:33 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Fri, 11 Sep 2009 17:31:08 +0000
(13:31 -0400)
This closes a whole where the page may be written before
the page_mkwrite caller has a chance to dirty it
(thanks to Nick Piggin)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index 233fe6f26120c61a7c2a4da5692f3fc7a8ede943..c846482e79850ff2ba3a7eb97bfb23932fa44782 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-4552,11
+4552,14
@@
again:
}
ClearPageChecked(page);
set_page_dirty(page);
+ SetPageUptodate(page);
BTRFS_I(inode)->last_trans = root->fs_info->generation + 1;
unlock_extent(io_tree, page_start, page_end, GFP_NOFS);
out_unlock:
+ if (!ret)
+ return VM_FAULT_LOCKED;
unlock_page(page);
out:
return ret;