summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2024-01-29 08:40:23 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:30:56 +0200
commit229f6dd373ce98791d0443562bf321a937ba62db (patch)
tree3744b26bbdc8325953e543b585346c612896e8be
parenta9ed3db251b108581cb7a5de94be6f8c949506c6 (diff)
downloadlinux-229f6dd373ce98791d0443562bf321a937ba62db.tar.gz
linux-229f6dd373ce98791d0443562bf321a937ba62db.tar.bz2
linux-229f6dd373ce98791d0443562bf321a937ba62db.zip
Revert "jfs: fix shift-out-of-bounds in dbJoin"
commit e42e29cc442395d62f1a8963ec2dfb700ba6a5d7 upstream. This reverts commit cca974daeb6c43ea971f8ceff5a7080d7d49ee30. The added sanity check is incorrect. BUDMIN is not the wrong value and is too small. Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/jfs/jfs_dmap.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 7a3f4f62c34b..d2df00676292 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2765,9 +2765,7 @@ static int dbBackSplit(dmtree_t *tp, int leafno, bool is_ctl)
* leafno - the number of the leaf to be updated.
* newval - the new value for the leaf.
*
- * RETURN VALUES:
- * 0 - success
- * -EIO - i/o error
+ * RETURN VALUES: none
*/
static int dbJoin(dmtree_t *tp, int leafno, int newval, bool is_ctl)
{
@@ -2794,10 +2792,6 @@ static int dbJoin(dmtree_t *tp, int leafno, int newval, bool is_ctl)
* get the buddy size (number of words covered) of
* the new value.
*/
-
- if ((newval - tp->dmt_budmin) > BUDMIN)
- return -EIO;
-
budsz = BUDSIZE(newval, tp->dmt_budmin);
/* try to join.