Commit f8f71d00 authored by J. Bruce Fields's avatar J. Bruce Fields

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: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d8836f77
...@@ -863,8 +863,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -863,8 +863,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_rename *rename = &u->rename; struct nfsd4_rename *rename = &u->rename;
__be32 status; __be32 status;
if (opens_in_grace(SVC_NET(rqstp)) && if (opens_in_grace(SVC_NET(rqstp)))
!(cstate->save_fh.fh_export->ex_flags & NFSEXP_NOSUBTREECHECK))
return nfserr_grace; return nfserr_grace;
status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,
rename->rn_snamelen, &cstate->current_fh, rename->rn_snamelen, &cstate->current_fh,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment