Răsfoiți Sursa

nfsd: nfsd_setattr needs to call commit_metadata

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>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Christoph Hellwig 15 ani în urmă
părinte
comite
b160fdabe9
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      fs/nfsd/vfs.c

+ 1 - 2
fs/nfsd/vfs.c

@@ -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))
-			write_inode_now(inode, 1);
+		commit_metadata(fhp);
 out:
 out:
 	return err;
 	return err;