Skip to content

Commit

Permalink
NFSD: Use only RQ_DROPME to signal the need to drop a reply
Browse files Browse the repository at this point in the history
Clean up: NFSv2 has the only two usages of rpc_drop_reply in the
NFSD code base. Since NFSv2 is going away at some point, replace
these in order to simplify the "drop this reply?" check in
nfsd_dispatch().

Signed-off-by: Chuck Lever <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
  • Loading branch information
chucklever authored and Chuck Lever committed Dec 10, 2022
1 parent ad3d24c commit 9315564
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs/nfsd/nfsproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ nfsd_proc_read(struct svc_rqst *rqstp)
if (resp->status == nfs_ok)
resp->status = fh_getattr(&resp->fh, &resp->stat);
else if (resp->status == nfserr_jukebox)
return rpc_drop_reply;
__set_bit(RQ_DROPME, &rqstp->rq_flags);
return rpc_success;
}

Expand Down Expand Up @@ -246,7 +246,7 @@ nfsd_proc_write(struct svc_rqst *rqstp)
if (resp->status == nfs_ok)
resp->status = fh_getattr(&resp->fh, &resp->stat);
else if (resp->status == nfserr_jukebox)
return rpc_drop_reply;
__set_bit(RQ_DROPME, &rqstp->rq_flags);
return rpc_success;
}

Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
svcxdr_init_encode(rqstp);

*statp = proc->pc_func(rqstp);
if (*statp == rpc_drop_reply || test_bit(RQ_DROPME, &rqstp->rq_flags))
if (test_bit(RQ_DROPME, &rqstp->rq_flags))
goto out_update_drop;

if (!proc->pc_encode(rqstp, &rqstp->rq_res_stream))
Expand Down

0 comments on commit 9315564

Please sign in to comment.