mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
gfs2: Silence possible null pointer dereference warning
In gfs2_rbm_find, rs is always NULL when minext is NULL, so gfs2_reservation_check_and_update will never be called on a NULL minext. This isn't innediately obvious though, so also check for a NULL minext for better code readability. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
6d8da302ae
commit
bea906ee16
1 changed files with 1 additions and 1 deletions
|
@ -1783,7 +1783,7 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
|||
goto next_bitmap;
|
||||
}
|
||||
rbm->offset = offset;
|
||||
if (!rs)
|
||||
if (!rs || !minext)
|
||||
return 0;
|
||||
|
||||
ret = gfs2_reservation_check_and_update(rbm, rs, *minext,
|
||||
|
|
Loading…
Reference in a new issue