Skip to content

Commit f50ae4c

Browse files
chuckleversmb49
authored andcommitted
NFSD: Use only RQ_DROPME to signal the need to drop a reply
BugLink: https://bugs.launchpad.net/bugs/2065435 [ Upstream commit 9315564 ] 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 <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent fa5bd2e commit f50ae4c

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)