diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /fs/block_dev.c | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 8bed0557d88c..73d6a735b8f3 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -405,7 +405,17 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin) | |||
405 | 405 | ||
406 | static int block_fsync(struct file *filp, struct dentry *dentry, int datasync) | 406 | static int block_fsync(struct file *filp, struct dentry *dentry, int datasync) |
407 | { | 407 | { |
408 | return sync_blockdev(I_BDEV(filp->f_mapping->host)); | 408 | struct block_device *bdev = I_BDEV(filp->f_mapping->host); |
409 | int error; | ||
410 | |||
411 | error = sync_blockdev(bdev); | ||
412 | if (error) | ||
413 | return error; | ||
414 | |||
415 | error = blkdev_issue_flush(bdev, NULL); | ||
416 | if (error == -EOPNOTSUPP) | ||
417 | error = 0; | ||
418 | return error; | ||
409 | } | 419 | } |
410 | 420 | ||
411 | /* | 421 | /* |