Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1635959

[PATCH] VFS: fix bugon.cocci warnings

From Julia Lawall <julia.lawall@lip6.fr>
Newsgroups linux.kernel
Subject [PATCH] VFS: fix bugon.cocci warnings
Date 2017-05-04 20:30 +0200
Message-ID <tDtFL-7ee-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


 Use BUG_ON instead of a if condition followed by BUG.

Generated by: scripts/coccinelle/misc/bugon.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
mount-context
head:   87bc8f53d9779ac0347cf31c637a3d1a52611680
commit: be6c651c8f022bd739eb5f894a896bcde5834f82 [3/9] VFS: Introduce a
mount context

 mount_context.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/mount_context.c
+++ b/fs/mount_context.c
@@ -191,8 +191,7 @@ struct mount_context *__vfs_fsopen(struc
 	struct mount_context *mc;
 	int ret;

-	if (fs_type->fsopen && fs_type->mc_size < sizeof(*mc))
-		BUG();
+	BUG_ON(fs_type->fsopen && fs_type->mc_size < sizeof(*mc));

 	mc = kzalloc(max_t(size_t, fs_type->mc_size, sizeof(*mc)), GFP_KERNEL);
 	if (!mc)

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] VFS: fix bugon.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2017-05-04 20:30 +0200
  Re: [PATCH] VFS: fix bugon.cocci warnings David Howells <dhowells@redhat.com> - 2017-05-04 22:10 +0200

csiph-web