diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-01-11 00:11:09 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 01:30:53 +0100 |
commit | 37c69b98d0dca54d9eb72226bbf2e211aaaf126e (patch) | |
tree | 249277ba7072933b760164bfac713140c0438745 /fs/reiserfs/super.c | |
parent | reiserfs: delay reiserfs lock until journal initialization (diff) | |
download | linux-37c69b98d0dca54d9eb72226bbf2e211aaaf126e.tar.xz linux-37c69b98d0dca54d9eb72226bbf2e211aaaf126e.zip |
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.c | 21 |
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"); |