From 5c7516c87fd277f502286e53d3b7dc2e84d7ce8d Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Tue, 10 Jan 2012 15:11:11 -0800 Subject: [PATCH] --- yaml --- r: 283103 b: refs/heads/master c: 9b467e6ebebbe75288aeb7e816ffbb5d35d6eaa3 h: refs/heads/master i: 283101: bd3368bfb24f0c59c12d68de630020a238043848 283099: e65823e1baf4ab2df1ad1694f429102d1573b3b5 283095: 1e192b828c28e5c50153528dcb2887ad3ffdc982 283087: 380105187af1a2119348b6bcc9a609000d0e09d6 283071: a2da191348ee1fe263074b0b0fe59269a8186d5a v: v3 --- [refs] | 2 +- trunk/fs/reiserfs/super.c | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index beca45c8794e..c1b7d7b8418e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37c69b98d0dca54d9eb72226bbf2e211aaaf126e +refs/heads/master: 9b467e6ebebbe75288aeb7e816ffbb5d35d6eaa3 diff --git a/trunk/fs/reiserfs/super.c b/trunk/fs/reiserfs/super.c index 61b60380d2ce..e12d8b97cd4d 100644 --- a/trunk/fs/reiserfs/super.c +++ b/trunk/fs/reiserfs/super.c @@ -1519,9 +1519,7 @@ static int read_super_block(struct super_block *s, int offset) static int reread_meta_blocks(struct super_block *s) { ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s))); - reiserfs_write_unlock(s); wait_on_buffer(SB_BUFFER_WITH_SB(s)); - reiserfs_write_lock(s); if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { reiserfs_warning(s, "reiserfs-2504", "error reading the super"); return 1; @@ -1837,24 +1835,14 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) */ } - /* - * 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 - * reiserfs helpers called in the mount path and elsewhere require - * this lock to be held even if it's not always necessary. Let's be - * conservative and hold it early. The window can be reduced after - * careful review of the code. - */ - reiserfs_write_lock(s); - if (reread_meta_blocks(s)) { SWARN(silent, s, "jmacd-9", "unable to reread meta blocks after journal init"); - goto error; + goto error_unlocked; } if (replay_only(s)) - goto error; + goto error_unlocked; if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) { SWARN(silent, s, "clm-7000", @@ -1868,9 +1856,19 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) reiserfs_init_locked_inode, (void *)(&args)); if (!root_inode) { SWARN(silent, s, "jmacd-10", "get root inode failed"); - goto error; + goto error_unlocked; } + /* + * 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 + * reiserfs helpers called in the mount path and elsewhere require + * this lock to be held even if it's not always necessary. Let's be + * conservative and hold it early. The window can be reduced after + * careful review of the code. + */ + reiserfs_write_lock(s); + if (root_inode->i_state & I_NEW) { reiserfs_read_locked_inode(root_inode, &args); unlock_new_inode(root_inode);