/* Write out and wait upon all dirty data associated with this device. Filesystem data as well as the underlying block device. Takes the superblock lock.  */
int fsync_bdev(struct block_device *bdev)
/* Write out and wait upon all dirty data associated with this device. Filesystem data as well as the underlying block device. Takes the superblock lock.  */
int fsync_bdev(struct block_device *bdev)
{
	struct super_block *sb = get_super(bdev);
	if (sb) {
		int res = sync_filesystem(sb);
		drop_super(sb);
		return res;
	}
	return sync_blockdev(bdev);
}