mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
f7071db2fe
commit
171c047289
|
|
@ -6928,7 +6928,6 @@ static int ocfs2_grab_folios(struct inode *inode, loff_t start, loff_t end,
|
|||
|
||||
out:
|
||||
if (ret != 0) {
|
||||
if (folios)
|
||||
ocfs2_unlock_and_free_folios(folios, numfolios);
|
||||
numfolios = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue