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


Groups > linux.kernel > #1635959 > unrolled thread

[PATCH] VFS: fix bugon.cocci warnings

Started byJulia Lawall <julia.lawall@lip6.fr>
First post2017-05-04 20:30 +0200
Last post2017-05-04 22:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

#1635959 — [PATCH] VFS: fix bugon.cocci warnings

FromJulia Lawall <julia.lawall@lip6.fr>
Date2017-05-04 20:30 +0200
Subject[PATCH] VFS: fix bugon.cocci warnings
Message-ID<tDtFL-7ee-3@gated-at.bofh.it>
 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)

[toc] | [next] | [standalone]


#1636009

FromDavid Howells <dhowells@redhat.com>
Date2017-05-04 22:10 +0200
Message-ID<tDvex-8iS-21@gated-at.bofh.it>
In reply to#1635959
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web