Skip to content

Commit

Permalink
fix block device fallout from ->fsync() changes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki authored and Al Viro committed Aug 2, 2011
1 parent cfe2234 commit da5aa86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da5aa86

Please sign in to comment.