diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-02 02:17:48 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-08-01 21:33:47 -0400 |
commit | da5aa861bea09197e6ae4d7c46618616064891e4 (patch) | |
tree | ed121115f16961ed9c3a77c86d943a90cea917e9 /fs/block_dev.c | |
parent | cfe22345ad5ef29e192e157fdc3e17d357e4bc24 (diff) |
fix block device fallout from ->fsync() changes
blkdev_fsync() needs to write pages in pagecache...
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index f28680553288..ff77262e887c 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 |