Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200622
b: refs/heads/master
c: 29cb485
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 11, 2010
1 parent c2f834d commit 8af0717
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: 334132ae921a14ac2b2ba48e174136f7f2c9aae1
refs/heads/master: 29cb48594b873f6193d6327097e504bd3e2314de
18 changes: 10 additions & 8 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,19 +534,21 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
static bool pin_sb_for_writeback(struct super_block *sb)
{
spin_lock(&sb_lock);
if (list_empty(&sb->s_instances)) {
spin_unlock(&sb_lock);
return false;
}

sb->s_count++;
spin_unlock(&sb_lock);

if (down_read_trylock(&sb->s_umount)) {
if (sb->s_root) {
spin_unlock(&sb_lock);
if (sb->s_root)
return true;
}
/*
* umounted, drop rwsem again and fall through to failure
*/
up_read(&sb->s_umount);
}
sb->s_count--;
spin_unlock(&sb_lock);

put_super(sb);
return false;
}

Expand Down

0 comments on commit 8af0717

Please sign in to comment.