Skip to content
Commit 27d0e5bc authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Jan Kara
Browse files

reiserfs: fix corruption introduced by balance_leaf refactor

Commits f1f007c3 (reiserfs: balance_leaf refactor, pull out
balance_leaf_insert_left) and cf22df18

 (reiserfs: balance_leaf
refactor, pull out balance_leaf_paste_left) missed that the `body'
pointer was getting repositioned. Subsequent users of the pointer
would expect it to be repositioned, and as a result, parts of the
tree would get overwritten. The most common observed corruption
is indirect block pointers being overwritten.

Since the body value isn't actually used anymore in the called routines,
we can pass back the offset it should be shifted. We constify the body
and ih pointers in the balance_leaf as a mostly-free preventative measure.

Cc: <stable@vger.kernel.org> # 3.16
Reported-and-tested-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 3f1be4f9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment