Skip to content

Commit

Permalink
vfs: Call ->sync_fs() even if s_dirt is 0 (version 4)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
jankara authored and Al Viro committed Jun 12, 2009
1 parent 5a3e5cb commit bfe8812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void sync_filesystems(int wait)
sb->s_count++;
spin_unlock(&sb_lock);
down_read(&sb->s_umount);
if (sb->s_root && (wait || sb->s_dirt))
if (sb->s_root)
sb->s_op->sync_fs(sb, wait);
up_read(&sb->s_umount);
/* restart only when sb is no longer on the list */
Expand Down

0 comments on commit bfe8812

Please sign in to comment.