Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocfs2: remove unnecessary NULL check in ocfs2_grab_folios()

Smatch complains that checking "folios" for NULL doesn't make sense
because it has already been dereferenced at this point. Really passing a
NULL "folios" pointer to ocfs2_grab_folios() doesn't make sense, and
fortunately none of the callers do that. Delete the unnecessary NULL
check.

Link: https://lkml.kernel.org/r/aKRG39hyvDJcN2G7@stanley.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Mark Tinguely <mark.tinguely@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Dan Carpenter and committed by
Andrew Morton
171c0472 f7071db2

+1 -2
+1 -2
fs/ocfs2/alloc.c
··· 6928 6928 6929 6929 out: 6930 6930 if (ret != 0) { 6931 - if (folios) 6932 - ocfs2_unlock_and_free_folios(folios, numfolios); 6931 + ocfs2_unlock_and_free_folios(folios, numfolios); 6933 6932 numfolios = 0; 6934 6933 } 6935 6934