Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200617
b: refs/heads/master
c: cf37e97
h: refs/heads/master
i:
  200615: 1f76b38
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 11, 2010
1 parent 60346da commit 1fea17d
Show file tree
Hide file tree
Showing 3 changed files with 9 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: 3c4d716538f3eefb1c1f10961a047a6456a2b590
refs/heads/master: cf37e972478ec58a8a54a6b4f951815f0ae28f78
6 changes: 6 additions & 0 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ void writeback_inodes_sb(struct super_block *sb)
.sync_mode = WB_SYNC_NONE,
};

WARN_ON(!rwsem_is_locked(&sb->s_umount));

args.nr_pages = nr_dirty + nr_unstable +
(inodes_stat.nr_inodes - inodes_stat.nr_unused);

Expand All @@ -1197,7 +1199,9 @@ EXPORT_SYMBOL(writeback_inodes_sb);
int writeback_inodes_sb_if_idle(struct super_block *sb)
{
if (!writeback_in_progress(sb->s_bdi)) {
down_read(&sb->s_umount);
writeback_inodes_sb(sb);
up_read(&sb->s_umount);
return 1;
} else
return 0;
Expand All @@ -1220,6 +1224,8 @@ void sync_inodes_sb(struct super_block *sb)
.range_cyclic = 0,
};

WARN_ON(!rwsem_is_locked(&sb->s_umount));

bdi_queue_work_onstack(&args);
wait_sb_inodes(sb);
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ubifs/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
*/
static void shrink_liability(struct ubifs_info *c, int nr_to_write)
{
down_read(&c->vfs_sb->s_umount);
writeback_inodes_sb(c->vfs_sb);
up_read(&c->vfs_sb->s_umount);
}

/**
Expand Down

0 comments on commit 1fea17d

Please sign in to comment.