From: Rafael J. Wysocki Date: Tue, 2 Aug 2011 00:17:48 +0000 (+0200) Subject: fix block device fallout from ->fsync() changes X-Git-Tag: v3.1-rc1~27^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da5aa861bea09197e6ae4d7c46618616064891e4;p=profile%2Fivi%2Fkernel-x86-ivi.git fix block device fallout from ->fsync() changes blkdev_fsync() needs to write pages in pagecache... Signed-off-by: Rafael J. Wysocki Signed-off-by: Al Viro --- diff --git a/fs/block_dev.c b/fs/block_dev.c index f286805..ff77262 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -387,6 +387,10 @@ int blkdev_fsync(struct file *filp, loff_t start, loff_t end, int datasync) struct inode *bd_inode = filp->f_mapping->host; struct block_device *bdev = I_BDEV(bd_inode); int error; + + error = filemap_write_and_wait_range(filp->f_mapping, start, end); + if (error) + return error; /* * There is no need to serialise calls to blkdev_issue_flush with