From: Eric Sesterhenn <snakebyte@gmx.de>
Date: Tue, 3 Oct 2006 21:37:14 +0000 (+0200)
Subject: BUG_ON() conversion in fs/nfsd/
X-Git-Tag: firefly_0821_release~32539^2~4
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=73dff8be9ea89df26bfb6a0443ad912de6e7bd00;p=firefly-linux-kernel-4.4.55.git

BUG_ON() conversion in fs/nfsd/

This patch converts an if () BUG(); construct to BUG_ON();
which occupies less space, uses unlikely and is safer when
BUG() is disabled.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 5446a0861d1d..5be00436b5b8 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -198,8 +198,7 @@ static char *savemem(struct nfsd4_compoundargs *argp, u32 *p, int nbytes)
 		p = new;
 		memcpy(p, argp->tmp, nbytes);
 	} else {
-		if (p != argp->tmpp)
-			BUG();
+		BUG_ON(p != argp->tmpp);
 		argp->tmpp = NULL;
 	}
 	if (defer_free(argp, kfree, p)) {