diff options
author | Xin Zhong <xin.zhong@intel.com> | 2010-12-09 09:30:14 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-12-10 16:29:10 -0500 |
commit | 914ee295af418e936ec20a08c1663eaabe4cd07a (patch) | |
tree | 2e880ea913b8cbadf22b2288b5c278c2e5eadb60 /fs/afs/fsclient.c | |
parent | f106e82caaa0d943e47cacc184f5b40d538e0044 (diff) |
Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
This problem is found in meego testing:
http://bugs.meego.com/show_bug.cgi?id=6672
A file in btrfs is mmaped and the mmaped buffer is passed to pwrite to write to the same page
of the same file. In btrfs_file_aio_write(), the pages is locked by prepare_pages(). So when
btrfs_copy_from_user() is called, page fault happens and the same page needs to be locked again
in filemap_fault(). The fix is to move iov_iter_fault_in_readable() before prepage_pages() to make page
fault happen before pages are locked. And also disable page fault in critical region in
btrfs_copy_from_user().
Reviewed-by: Yan, Zheng<zheng.z.yan@intel.com>
Signed-off-by: Zhong, Xin <xin.zhong@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/afs/fsclient.c')
0 files changed, 0 insertions, 0 deletions