diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index a5b51c2c5e329bc512b897c5c334a5dbb951506c..8f856e0a85a693862dc6b034f55b3773cc76b2db 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -2908,6 +2908,9 @@ static void dbAdjTree(dmtree_t * tp, int leafno, int newval) /* is the current value the same as the old value ? if so, * there is nothing to do. */ + if (WARN_ON_ONCE(lp >= CTLTREESIZE)) + return; + if (tp->dmt_stree[lp] == newval) return;