From: Trond Myklebust Date: Mon, 6 Jan 2020 18:40:31 +0000 (-0500) Subject: nfsd: Update the boot verifier on stable writes too. X-Git-Tag: v5.6-rc1~28^2~12 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7bf94c6ba9fb291bd28fac3228553cb305bfc92a;p=linux.git nfsd: Update the boot verifier on stable writes too. We don't know if the error returned by the fsync() call is exclusive to the data written by the stable write, so play it safe. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 4652854f3dd5..0a048dfb68ec 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -994,8 +994,11 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, host_err = vfs_iter_write(file, &iter, &pos, flags); up_read(&nf->nf_rwsem); } - if (host_err < 0) + if (host_err < 0) { + nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), + nfsd_net_id)); goto out_nfserr; + } *cnt = host_err; nfsdstats.io_write += *cnt; fsnotify_modify(file);