]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nfsd4: forbid all renames during grace period
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 6 Nov 2018 16:47:20 +0000 (11:47 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 27 Nov 2018 21:24:01 +0000 (16:24 -0500)
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>
fs/nfsd/nfs4proc.c

index c364acbb6aba0c3a4bfb594dd637d14159e0fb45..4cbf725cdcba945dede16a6df724cd7b9c39b0c8 100644 (file)
@@ -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,