Commit 44f4f729 authored by Jan Kara's avatar Jan Kara

ext3: Check return value of blkdev_issue_flush()

blkdev_issue_flush() can fail. Make sure the error gets properly propagated.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 349ecd6a
...@@ -92,8 +92,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync) ...@@ -92,8 +92,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
* disk caches manually so that data really is on persistent * disk caches manually so that data really is on persistent
* storage * storage
*/ */
if (needs_barrier) if (needs_barrier) {
blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); int err;
err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
if (!ret)
ret = err;
}
out: out:
trace_ext3_sync_file_exit(inode, ret); trace_ext3_sync_file_exit(inode, ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment