]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/sync.c
vfs: Make sys_sync writeout also block device inodes
authorJan Kara <jack@suse.cz>
Tue, 3 Jul 2012 14:45:32 +0000 (16:45 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Jul 2012 19:58:49 +0000 (23:58 +0400)
commita8c7176b6ded413d5044a00f1d05477b95a6d7ad
treea2b3e075b7181ac100b13a4f9b57ae6628407a5f
parent5c0d6b60a0ba46d45020547eacf7199171920935
vfs: Make sys_sync writeout also block device inodes

In case block device does not have filesystem mounted on it, sys_sync will just
ignore it and doesn't writeout its dirty pages. This is because writeback code
avoids writing inodes from superblock without backing device and
blockdev_superblock is such a superblock.  Since it's unexpected that sync
doesn't writeout dirty data for block devices be nice to users and change the
behavior to do so. So now we iterate over all block devices on blockdev_super
instead of iterating over all superblocks when syncing block devices.

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>
fs/sync.c