diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-01-10 18:11:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:53 -0500 |
commit | 37c69b98d0dca54d9eb72226bbf2e211aaaf126e (patch) | |
tree | 249277ba7072933b760164bfac713140c0438745 /fs/reiserfs/super.c | |
parent | f32485be8397ad811312bc055d2e2a5906bc7576 (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.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) | |||
1826 | printk("reiserfs: using flush barriers\n"); | 1826 | printk("reiserfs: using flush barriers\n"); |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | // set_device_ro(s->s_dev, 1) ; | ||
1830 | if (journal_init(s, jdev_name, old_format, commit_max_age)) { | ||
1831 | SWARN(silent, s, "sh-2022", | ||
1832 | "unable to initialize journal space"); | ||
1833 | goto error_unlocked; | ||
1834 | } else { | ||
1835 | jinit_done = 1; /* once this is set, journal_release must be called | ||
1836 | ** if we error out of the mount | ||
1837 | */ | ||
1838 | } | ||
1839 | |||
1829 | /* | 1840 | /* |
1830 | * This path assumed to be called with the BKL in the old times. | 1841 | * This path assumed to be called with the BKL in the old times. |
1831 | * Now we have inherited the big reiserfs lock from it and many | 1842 | * 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) | |||
1836 | */ | 1847 | */ |
1837 | reiserfs_write_lock(s); | 1848 | reiserfs_write_lock(s); |
1838 | 1849 | ||
1839 | // set_device_ro(s->s_dev, 1) ; | ||
1840 | if (journal_init(s, jdev_name, old_format, commit_max_age)) { | ||
1841 | SWARN(silent, s, "sh-2022", | ||
1842 | "unable to initialize journal space"); | ||
1843 | goto error; | ||
1844 | } else { | ||
1845 | jinit_done = 1; /* once this is set, journal_release must be called | ||
1846 | ** if we error out of the mount | ||
1847 | */ | ||
1848 | } | ||
1849 | if (reread_meta_blocks(s)) { | 1850 | if (reread_meta_blocks(s)) { |
1850 | SWARN(silent, s, "jmacd-9", | 1851 | SWARN(silent, s, "jmacd-9", |
1851 | "unable to reread meta blocks after journal init"); | 1852 | "unable to reread meta blocks after journal init"); |