aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-04-27 10:43:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:03 -0400
commitbfe881255c74800147523b59c85328a1a826ba21 (patch)
tree4ed9b761a440ee0b69a35a5c8bddc42c64195e47 /fs
parent5a3e5cb8e08bd876e2542c1451c9a93dab1b0e39 (diff)
vfs: Call ->sync_fs() even if s_dirt is 0 (version 4)
sync_filesystems() has a condition that if wait == 0 and s_dirt == 0, then ->sync_fs() isn't called. This does not really make much sence since s_dirt is generally used by a filesystem to mean that ->write_super() needs to be called. But ->sync_fs() does different things. I even suspect that some filesystems (btrfs?) sets s_dirt just to fool this logic. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index 18d159dc1e40..fae91ba38e48 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -510,7 +510,7 @@ restart:
510 sb->s_count++; 510 sb->s_count++;
511 spin_unlock(&sb_lock); 511 spin_unlock(&sb_lock);
512 down_read(&sb->s_umount); 512 down_read(&sb->s_umount);
513 if (sb->s_root && (wait || sb->s_dirt)) 513 if (sb->s_root)
514 sb->s_op->sync_fs(sb, wait); 514 sb->s_op->sync_fs(sb, wait);
515 up_read(&sb->s_umount); 515 up_read(&sb->s_umount);
516 /* restart only when sb is no longer on the list */ 516 /* restart only when sb is no longer on the list */