Commit 9276b6f4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman

nfsd: nfsd_setattr needs to call commit_metadata

commit b160fdab upstream.

The conversion of write_inode_now calls to commit_metadata in commit
f501912a 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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a07d9118
...@@ -443,8 +443,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, ...@@ -443,8 +443,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
if (size_change) if (size_change)
put_write_access(inode); put_write_access(inode);
if (!err) if (!err)
if (EX_ISSYNC(fhp->fh_export)) commit_metadata(fhp);
write_inode_now(inode, 1);
out: out:
return err; return err;
......
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