]> git.hungrycats.org Git - linux/commitdiff
nfsd: nfsd_setattr needs to call commit_metadata
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Jun 2010 19:59:18 +0000 (21:59 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:52 +0000 (11:22 -0700)
commit b160fdabe93a8a53094f90f02bf4dcb500782aab upstream.

The conversion of write_inode_now calls to commit_metadata in commit
f501912a35c02eadc55ca9396ece55fe36f785d0 missed out the call in nfsd_setattr.

But without this conversion we can't guarantee that a SETATTR request
has actually been commited to disk with XFS, which causes a regression
from 2.6.32 (only for NFSv2, but anyway).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfsd/vfs.c

index 23c06f77f4cab11b9ccc775698bd6c9cd1111e80..4eb9baa33081187d71dff65667e17333748e3437 100644 (file)
@@ -443,8 +443,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
        if (size_change)
                put_write_access(inode);
        if (!err)
-               if (EX_ISSYNC(fhp->fh_export))
-                       write_inode_now(inode, 1);
+               commit_metadata(fhp);
 out:
        return err;