Linux-NFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nfsd: remove unnecessary assertion in nfsd4_encode_replay
@ 2019-12-17 22:50 Aditya Pakki
  2019-12-19 22:46 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Aditya Pakki @ 2019-12-17 22:50 UTC (permalink / raw)
  To: pakki001; +Cc: kjlu, J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel

The replay variable is set in the only caller of nfsd4_encode_replay.
The assertion is unnecessary and the patch removes this check.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 fs/nfsd/nfs4xdr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index d2dc4c0e22e8..fb2433676376 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4500,8 +4500,6 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
 	__be32 *p;
 	struct nfs4_replay *rp = op->replay;
 
-	BUG_ON(!rp);
-
 	p = xdr_reserve_space(xdr, 8 + rp->rp_buflen);
 	if (!p) {
 		WARN_ON_ONCE(1);
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsd: remove unnecessary assertion in nfsd4_encode_replay
  2019-12-17 22:50 [PATCH] nfsd: remove unnecessary assertion in nfsd4_encode_replay Aditya Pakki
@ 2019-12-19 22:46 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2019-12-19 22:46 UTC (permalink / raw)
  To: Aditya Pakki; +Cc: kjlu, Chuck Lever, linux-nfs, linux-kernel

Thanks, applying.--b.

On Tue, Dec 17, 2019 at 04:50:47PM -0600, Aditya Pakki wrote:
> The replay variable is set in the only caller of nfsd4_encode_replay.
> The assertion is unnecessary and the patch removes this check.
> 
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
>  fs/nfsd/nfs4xdr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index d2dc4c0e22e8..fb2433676376 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -4500,8 +4500,6 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
>  	__be32 *p;
>  	struct nfs4_replay *rp = op->replay;
>  
> -	BUG_ON(!rp);
> -
>  	p = xdr_reserve_space(xdr, 8 + rp->rp_buflen);
>  	if (!p) {
>  		WARN_ON_ONCE(1);
> -- 
> 2.20.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 22:50 [PATCH] nfsd: remove unnecessary assertion in nfsd4_encode_replay Aditya Pakki
2019-12-19 22:46 ` J. Bruce Fields

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git