mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 07:30:16 +00:00
NFS: Fix an f_mode/f_flags confusion in fs/nfs/write.c
O_SYNC is stored in filp->f_flags. Thanks to Al Viro for pointing out the bug. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
bfa274e243
commit
4b5621f6b1
@ -734,7 +734,7 @@ int nfs_updatepage(struct file *file, struct page *page,
|
|||||||
*/
|
*/
|
||||||
if (nfs_write_pageuptodate(page, inode) &&
|
if (nfs_write_pageuptodate(page, inode) &&
|
||||||
inode->i_flock == NULL &&
|
inode->i_flock == NULL &&
|
||||||
!(file->f_mode & O_SYNC)) {
|
!(file->f_flags & O_SYNC)) {
|
||||||
count = max(count + offset, nfs_page_length(page));
|
count = max(count + offset, nfs_page_length(page));
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user