Commit e8006df8 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] NFS: Ensure that dirty pages are written with the right creds.

 When doing shared mmap writes, the resulting dirty NFS pages may
 find themselves incapable of being flushed out if I/O is started
 after the file was released.
 Make sure we start I/O on all existing dirty pages in nfs_file_release().
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52898b44
......@@ -108,6 +108,9 @@ nfs_file_open(struct inode *inode, struct file *filp)
static int
nfs_file_release(struct inode *inode, struct file *filp)
{
/* Ensure that dirty pages are flushed out with the right creds */
if (filp->f_mode & FMODE_WRITE)
filemap_fdatawrite(filp->f_mapping);
return NFS_PROTO(inode)->file_release(inode, filp);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment