diff options
-rw-r--r-- | fs/nfsd/nfs4proc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index d7c58aa64f06..2dc8910f8f72 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2435,6 +2435,7 @@ static __be32 nfsd4_layoutget(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { + struct net *net = SVC_NET(rqstp); struct nfsd4_layoutget *lgp = &u->layoutget; struct svc_fh *current_fh = &cstate->current_fh; const struct nfsd4_layout_ops *ops; @@ -2486,6 +2487,10 @@ nfsd4_layoutget(struct svc_rqst *rqstp, if (lgp->lg_seg.length == 0) goto out; + nfserr = nfserr_grace; + if (locks_in_grace(net)) + goto out; + nfserr = nfsd4_preprocess_layout_stateid(rqstp, cstate, &lgp->lg_sid, true, lgp->lg_layout_type, &ls); if (nfserr) { |