aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-07-03 10:45:27 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 15:58:18 -0400
commit6eedc70150d55b5885800eb6664ea226dc2cb66f (patch)
treee0d0762e047d1fae5d7b6ead1214545bcb205f4e /fs/sync.c
parent9e9ad5f408889db6038a59b38ede29ff1ba9ef2f (diff)
vfs: Move noop_backing_dev_info check from sync into writeback
In principle, a filesystem may want to have ->sync_fs() called during sync(1) although it does not have a bdi (i.e. s_bdi is set to noop_backing_dev_info). Only writeback code really needs bdi set to something reasonable. So move the checks where they are more logical. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sync.c')
-rw-r--r--fs/sync.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 11e3d1c44901..b3d2a001293f 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -29,13 +29,6 @@
29 */ 29 */
30static int __sync_filesystem(struct super_block *sb, int wait) 30static int __sync_filesystem(struct super_block *sb, int wait)
31{ 31{
32 /*
33 * This should be safe, as we require bdi backing to actually
34 * write out data in the first place
35 */
36 if (sb->s_bdi == &noop_backing_dev_info)
37 return 0;
38
39 if (sb->s_qcop && sb->s_qcop->quota_sync) 32 if (sb->s_qcop && sb->s_qcop->quota_sync)
40 sb->s_qcop->quota_sync(sb, -1, wait); 33 sb->s_qcop->quota_sync(sb, -1, wait);
41 34