Skip to content

Commit

Permalink
nfsd: nfsd_setattr needs to call commit_metadata
Browse files Browse the repository at this point in the history
The conversion of write_inode_now calls to commit_metadata in commit
f501912 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>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Christoph Hellwig authored and J. Bruce Fields committed Jun 1, 2010
1 parent e40152e commit b160fda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b160fda

Please sign in to comment.