NFS: Fix an f_mode/f_flags confusion in fs/nfs/write.c
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 25 Feb 2008 23:56:29 +0000 (15:56 -0800)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 7 Mar 2008 19:33:40 +0000 (14:33 -0500)
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>
fs/nfs/write.c

index f55c437124a2287e1ae80834af5059c0f3388d38..80c61fdb2720c4b05f86ff7c590cd0af566e2b8d 100644 (file)
@@ -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;
        }