]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: perag may be null in xfs_imap()
authorDave Chinner <dchinner@redhat.com>
Fri, 18 Jun 2021 15:14:20 +0000 (08:14 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 18 Jun 2021 15:14:20 +0000 (08:14 -0700)
commit1adc8a1abf64462e3583a6786be9fbc880c2d196
treedc98db5743d9e91ba0f60071202eb634b5cecf6d
parent06f6f20c5d6f383716eab94348c2adde621004eb
xfs: perag may be null in xfs_imap()

Dan Carpenter's static checker reported:

The patch 41ccffe6c2f6: "xfs: use perag for ialloc btree cursors"
from Jun 2, 2021, leads to the following Smatch complaint:

    fs/xfs/libxfs/xfs_ialloc.c:2403 xfs_imap()
    error: we previously assumed 'pag' could be null (see line 2294)

And it's right. Fix it.

Fixes: 41ccffe6c2f6 ("xfs: use perag for ialloc btree cursors")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/libxfs/xfs_ialloc.c