Message ID | alpine.DEB.2.20.1705042020280.4880@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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
--- 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)