jfs: Fix shift-out-of-bounds in dbDiscardAG

When searching for the next smaller log2 block, BLKSTOL2() returned 0,
causing shift exponent -1 to be negative.

This patch fixes the issue by exiting the loop directly when negative
shift is found.

Reported-by: syzbot+61be3359d2ee3467e7e4@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=61be3359d2ee3467e7e4
Signed-off-by: Pei Li <peili.dev@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

authored by Pei Li and committed by Dave Kleikamp 7063b802 f73f969b

+2
+2
fs/jfs/jfs_dmap.c
··· 1626 1626 } else if (rc == -ENOSPC) { 1627 1627 /* search for next smaller log2 block */ 1628 1628 l2nb = BLKSTOL2(nblocks) - 1; 1629 + if (unlikely(l2nb < 0)) 1630 + break; 1629 1631 nblocks = 1LL << l2nb; 1630 1632 } else { 1631 1633 /* Trim any already allocated blocks */