summaryrefslogtreecommitdiff
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-01-10 15:11:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 16:30:53 -0800
commit37c69b98d0dca54d9eb72226bbf2e211aaaf126e (patch)
tree249277ba7072933b760164bfac713140c0438745 /fs/reiserfs/super.c
parentf32485be8397ad811312bc055d2e2a5906bc7576 (diff)
reiserfs: don't lock journal_init()
journal_init() doesn't need the lock since no operation on the filesystem is involved there. journal_read() and get_list_bitmap() have yet to be reviewed carefully though before removing the lock there. Just keep the it around these two calls for safety. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 620dd5d9e1b1..61b60380d2ce 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1826,6 +1826,17 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
printk("reiserfs: using flush barriers\n");
}
+ // set_device_ro(s->s_dev, 1) ;
+ if (journal_init(s, jdev_name, old_format, commit_max_age)) {
+ SWARN(silent, s, "sh-2022",
+ "unable to initialize journal space");
+ goto error_unlocked;
+ } else {
+ jinit_done = 1; /* once this is set, journal_release must be called
+ ** if we error out of the mount
+ */
+ }
+
/*
* This path assumed to be called with the BKL in the old times.
* Now we have inherited the big reiserfs lock from it and many
@@ -1836,16 +1847,6 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
*/
reiserfs_write_lock(s);
- // set_device_ro(s->s_dev, 1) ;
- if (journal_init(s, jdev_name, old_format, commit_max_age)) {
- SWARN(silent, s, "sh-2022",
- "unable to initialize journal space");
- goto error;
- } else {
- jinit_done = 1; /* once this is set, journal_release must be called
- ** if we error out of the mount
- */
- }
if (reread_meta_blocks(s)) {
SWARN(silent, s, "jmacd-9",
"unable to reread meta blocks after journal init");