Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283103
b: refs/heads/master
c: 9b467e6
h: refs/heads/master
i:
  283101: bd3368b
  283099: e65823e
  283095: 1e192b8
  283087: 3801051
  283071: a2da191
v: v3
  • Loading branch information
Frederic Weisbecker authored and Linus Torvalds committed Jan 11, 2012
1 parent d68d7ad commit 5c7516c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37c69b98d0dca54d9eb72226bbf2e211aaaf126e
refs/heads/master: 9b467e6ebebbe75288aeb7e816ffbb5d35d6eaa3
28 changes: 13 additions & 15 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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",
Expand All @@ -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);
Expand Down

0 comments on commit 5c7516c

Please sign in to comment.