Skip to content

Commit 2c89198

Browse files
Mike SnitzerAnna Schumaker
authored andcommitted
SUNRPC: remove call_allocate() BUG_ONs
Remove BUG_ON if p_arglen=0 to allow RPC with void arg. Remove BUG_ON if p_replen=0 to allow RPC with void return. The former was needed for the first revision of the LOCALIO protocol which had an RPC that took a void arg: /* raw RFC 9562 UUID */ typedef u8 uuid_t<UUID_SIZE>; program NFS_LOCALIO_PROGRAM { version LOCALIO_V1 { void NULL(void) = 0; uuid_t GETUUID(void) = 1; } = 1; } = 400122; The latter is needed for the final revision of the LOCALIO protocol which has a UUID_IS_LOCAL RPC which returns a void: /* raw RFC 9562 UUID */ typedef u8 uuid_t<UUID_SIZE>; program NFS_LOCALIO_PROGRAM { version LOCALIO_V1 { void NULL(void) = 0; void UUID_IS_LOCAL(uuid_t) = 1; } = 1; } = 400122; There is really no value in triggering a BUG_ON in response to either of these previously unsupported conditions. NeilBrown would like the entire 'if (proc->p_proc != 0)' branch removed (not just the one BUG_ON that must be removed for LOCALIO's immediate needs of returning void). Signed-off-by: Mike Snitzer <[email protected]> Reviewed-by: NeilBrown <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 47e9881 commit 2c89198

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

net/sunrpc/clnt.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,12 +1888,6 @@ call_allocate(struct rpc_task *task)
18881888
if (req->rq_buffer)
18891889
return;
18901890

1891-
if (proc->p_proc != 0) {
1892-
BUG_ON(proc->p_arglen == 0);
1893-
if (proc->p_decode != NULL)
1894-
BUG_ON(proc->p_replen == 0);
1895-
}
1896-
18971891
/*
18981892
* Calculate the size (in quads) of the RPC call
18991893
* and reply headers, and convert both values

0 commit comments

Comments
 (0)