Skip to content

Commit 9315564

Browse files
chuckleverChuck Lever
authored andcommitted
NFSD: Use only RQ_DROPME to signal the need to drop a reply
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]>
1 parent ad3d24c commit 9315564

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fs/nfsd/nfsproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ nfsd_proc_read(struct svc_rqst *rqstp)
211211
if (resp->status == nfs_ok)
212212
resp->status = fh_getattr(&resp->fh, &resp->stat);
213213
else if (resp->status == nfserr_jukebox)
214-
return rpc_drop_reply;
214+
__set_bit(RQ_DROPME, &rqstp->rq_flags);
215215
return rpc_success;
216216
}
217217

@@ -246,7 +246,7 @@ nfsd_proc_write(struct svc_rqst *rqstp)
246246
if (resp->status == nfs_ok)
247247
resp->status = fh_getattr(&resp->fh, &resp->stat);
248248
else if (resp->status == nfserr_jukebox)
249-
return rpc_drop_reply;
249+
__set_bit(RQ_DROPME, &rqstp->rq_flags);
250250
return rpc_success;
251251
}
252252

fs/nfsd/nfssvc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
10601060
svcxdr_init_encode(rqstp);
10611061

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

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

0 commit comments

Comments
 (0)