[PATCH] reiserfs: reset errval after initializing bitmap cache

Callers after reiserfs_init_bitmap_cache() expect errval to contain -EINVAL
until much later. If a condition fails before errval is reset later,
reiserfs_fill_super() will mistakenly return 0, causing an Oops in
do_add_mount(). This patch resets errval to -EINVAL after the call.

I view this as a temporary fix and real error codes should be used
throughout reiserfs_fill_super().

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Jeff Mahoney and committed by Linus Torvalds d2c89a42 d3e5a938

+1
+1
fs/reiserfs/super.c
··· 1619 1619 "jmacd-8: reiserfs_fill_super: unable to read bitmap"); 1620 1620 goto error; 1621 1621 } 1622 + errval = -EINVAL; 1622 1623 #ifdef CONFIG_REISERFS_CHECK 1623 1624 SWARN(silent, s, "CONFIG_REISERFS_CHECK is set ON"); 1624 1625 SWARN(silent, s, "- it is slow mode for debugging.");