Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173180
b: refs/heads/master
c: 193be0e
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Sep 17, 2009
1 parent 0b788f4 commit 3c9ab14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80503185989b2dd84170bb842e23d3fd45ebdf40
refs/heads/master: 193be0ee17dd7ea309ddab1093da17e5924d7f36
16 changes: 16 additions & 0 deletions trunk/fs/reiserfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2801,11 +2801,27 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
goto free_and_return;
}

/*
* We need to unlock here to avoid creating the following
* dependency:
* reiserfs_lock -> sysfs_mutex
* Because the reiserfs mmap path creates the following dependency:
* mm->mmap -> reiserfs_lock, hence we have
* mm->mmap -> reiserfs_lock ->sysfs_mutex
* This would ends up in a circular dependency with sysfs readdir path
* which does sysfs_mutex -> mm->mmap_sem
* This is fine because the reiserfs lock is useless in mount path,
* at least until we call journal_begin. We keep it for paranoid
* reasons.
*/
reiserfs_write_unlock(sb);
if (journal_init_dev(sb, journal, j_dev_name) != 0) {
reiserfs_write_lock(sb);
reiserfs_warning(sb, "sh-462",
"unable to initialize jornal device");
goto free_and_return;
}
reiserfs_write_lock(sb);

rs = SB_DISK_SUPER_BLOCK(sb);

Expand Down

0 comments on commit 3c9ab14

Please sign in to comment.