summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2018-11-06 19:47:20 +0300
committerJ. Bruce Fields <bfields@redhat.com>2018-11-28 00:24:01 +0300
commitf8f71d00651325377ec125938ee8a29c1f7da6ef (patch)
tree3b66ec173c32a74430f91dd6a44da15433e65a6d
parentd8836f772422210517fc6b36283fa5f63dd789e8 (diff)
downloadlinux-f8f71d00651325377ec125938ee8a29c1f7da6ef.tar.xz
nfsd4: forbid all renames during grace period
The idea here was that renaming a file on a nosubtreecheck export would make lookups of the old filehandle return STALE, making it impossible for clients to reclaim opens. But during the grace period I think we should also hold off on operations that would break delegations. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index c364acbb6aba..4cbf725cdcba 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -863,8 +863,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_rename *rename = &u->rename;
__be32 status;
- if (opens_in_grace(SVC_NET(rqstp)) &&
- !(cstate->save_fh.fh_export->ex_flags & NFSEXP_NOSUBTREECHECK))
+ if (opens_in_grace(SVC_NET(rqstp)))
return nfserr_grace;
status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,
rename->rn_snamelen, &cstate->current_fh,