nfsd: Ensure that nfsd_create_setattr commits files to stable storage
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 1 Jul 2014 22:27:53 +0000 (18:27 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 8 Jul 2014 21:14:31 +0000 (17:14 -0400)
Since nfsd_create_setattr strips the mode from the struct iattr, it
is quite possible that it will optimise away the call to nfsd_setattr
altogether.
If this is the case, then we never call commit_metadata() on the
newly created file.

Also ensure that both nfsd_setattr() and nfsd_create_setattr() fail
when the call to commit_metadata fails.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c

diff --cc fs/nfsd/vfs.c
Simple merge