projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80b4adc
)
ext4: call dax_pfn_mkwrite() for DAX fsync/msync
author
Ross Zwisler
<
[email protected]
>
Fri, 22 Jan 2016 23:10:53 +0000
(15:10 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 23 Jan 2016 01:02:18 +0000
(17:02 -0800)
To properly support the new DAX fsync/msync infrastructure filesystems
need to call dax_pfn_mkwrite() so that DAX can track when user pages are
dirtied.
Signed-off-by: Ross Zwisler <
[email protected]
>
Cc: "H. Peter Anvin" <
[email protected]
>
Cc: "J. Bruce Fields" <
[email protected]
>
Cc: "Theodore Ts'o" <
[email protected]
>
Cc: Alexander Viro <
[email protected]
>
Cc: Andreas Dilger <
[email protected]
>
Cc: Dave Chinner <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Jan Kara <
[email protected]
>
Cc: Jeff Layton <
[email protected]
>
Cc: Matthew Wilcox <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc: Dan Williams <
[email protected]
>
Cc: Matthew Wilcox <
[email protected]
>
Cc: Dave Hansen <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/ext4/file.c
patch
|
blob
|
history
diff --git
a/fs/ext4/file.c
b/fs/ext4/file.c
index 749b222e6498e8647126af37830dd1c312a9fb20..8c8965cc4aabc6873d41d608f167c98986cc3f5a 100644
(file)
--- a/
fs/ext4/file.c
+++ b/
fs/ext4/file.c
@@
-291,8
+291,8
@@
static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma,
{
struct inode *inode = file_inode(vma->vm_file);
struct super_block *sb = inode->i_sb;
- int ret = VM_FAULT_NOPAGE;
loff_t size;
+ int ret;
sb_start_pagefault(sb);
file_update_time(vma->vm_file);
@@
-300,6
+300,8
@@
static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma,
size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
if (vmf->pgoff >= size)
ret = VM_FAULT_SIGBUS;
+ else
+ ret = dax_pfn_mkwrite(vma, vmf);
up_read(&EXT4_I(inode)->i_mmap_sem);
sb_end_pagefault(sb);