]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8088df1b84ede82cfa6e059a3c607b6e9c73a07f
treea2b3e075b7181ac100b13a4f9b57ae6628407a5f
parentf2b3f0a9678015328e6b487efbb11ebcda7938ce
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