From: Trond Myklebust Date: Mon, 25 Feb 2008 23:56:29 +0000 (-0800) Subject: NFS: Fix an f_mode/f_flags confusion in fs/nfs/write.c X-Git-Tag: v2.6.25-rc5~11^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af1b8c2ff7c337c4e96db12d6b7b61eaa91aa069;p=linux-2.6 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 --- diff --git a/fs/nfs/write.c b/fs/nfs/write.c index f55c437124..80c61fdb27 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -734,7 +734,7 @@ int nfs_updatepage(struct file *file, struct page *page, */ if (nfs_write_pageuptodate(page, inode) && inode->i_flock == NULL && - !(file->f_mode & O_SYNC)) { + !(file->f_flags & O_SYNC)) { count = max(count + offset, nfs_page_length(page)); offset = 0; }