Skip to content
Commit b7b7fa43 authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Frederic Weisbecker
Browse files

reiserfs: Fix locking BUG during mount failure

Commit 8ebc4232 (reiserfs: kill-the-BKL)
introduced a bug in the mount failure case.

The error label releases the lock before calling journal_release_error,
but it requires that the lock be held. do_journal_release unlocks and
retakes it. When it releases it without it held, we trigger a BUG().

The error_alloc label skips the unlock since the lock isn't held yet
but none of the other conditions that are clean up exist yet either.

This patch returns immediately after the kzalloc failure and moves
the reiserfs_write_unlock after the journal_release_error call.

This was reported in https://bugzilla.novell.com/show_bug.cgi?id=591807



Reported-by: default avatarThomas Siedentopf <thomas.siedentopf@novell.com>
Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Cc: Thomas Siedentopf <thomas.siedentopf@novell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: 2.6.33.x <stable@kernel.org>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 2eaa9cfd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment