linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VFS: fix bugon.cocci warnings
@ 2017-05-04 18:21 Julia Lawall
  2017-05-04 20:06 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2017-05-04 18:21 UTC (permalink / raw)
  To: David Howells, Alexander Viro, kbuild-all, linux-fsdevel, linux-kernel

 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)

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

* Re: [PATCH] VFS: fix bugon.cocci warnings
  2017-05-04 18:21 [PATCH] VFS: fix bugon.cocci warnings Julia Lawall
@ 2017-05-04 20:06 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2017-05-04 20:06 UTC (permalink / raw)
  To: Julia Lawall
  Cc: dhowells, Alexander Viro, kbuild-all, linux-fsdevel, linux-kernel

Julia Lawall <julia.lawall@lip6.fr> wrote:

>  Use BUG_ON instead of a if condition followed by BUG.

I've already fixed that, thanks, just not pushed it yet.

David

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

end of thread, other threads:[~2017-05-04 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 18:21 [PATCH] VFS: fix bugon.cocci warnings Julia Lawall
2017-05-04 20:06 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).