Commit 6d205f12 authored by Vladimir Saveliev's avatar Vladimir Saveliev Committed by Linus Torvalds

[PATCH] reiserfs: fix key decrementing

This patch fixes a bug in function decrementing a key of stat data item.

Offset of reiserfs keys are compared as signed values.  To set key offset
to maximal possible value maximal signed value has to be used.

This bug is responsible for severe reiserfs filesystem corruption which
shows itself as warning vs-13060.  reiserfsck fixes this corruption by
filesystem tree rebuilding.
Signed-off-by: default avatarVladimir Saveliev <[email protected]>
Cc: <[email protected]>
Signed-off-by: default avatarAndrew Morton <[email protected]>
Signed-off-by: default avatarLinus Torvalds <[email protected]>
parent 505fa2c4
......@@ -23,7 +23,7 @@ static void sd_decrement_key(struct cpu_key *key)
set_cpu_key_k_type(key, TYPE_ANY);
set_cpu_key_k_offset(key, (loff_t) (-1));
set_cpu_key_k_offset(key, (loff_t)(~0ULL >> 1));
static int sd_is_left_mergeable(struct reiserfs_key *key, unsigned long bsize)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment