Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190202
b: refs/heads/master
c: b8af67e
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Linus Torvalds committed Apr 24, 2010
1 parent 3cb47b9 commit 9ca3f14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98d5ce0d0044666fc85a01915a1d22407eb546fd
refs/heads/master: b8af67e2681c693a21f3933e3bdfce4cf66596d3
17 changes: 12 additions & 5 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,23 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin)

int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync)
{
struct block_device *bdev = I_BDEV(filp->f_mapping->host);
struct inode *bd_inode = filp->f_mapping->host;
struct block_device *bdev = I_BDEV(bd_inode);
int error;

error = sync_blockdev(bdev);
if (error)
return error;

/*
* There is no need to serialise calls to blkdev_issue_flush with
* i_mutex and doing so causes performance issues with concurrent
* O_SYNC writers to a block device.
*/
mutex_unlock(&bd_inode->i_mutex);

error = blkdev_issue_flush(bdev, NULL);
if (error == -EOPNOTSUPP)
error = 0;

mutex_lock(&bd_inode->i_mutex);

return error;
}
EXPORT_SYMBOL(blkdev_fsync);
Expand Down

0 comments on commit 9ca3f14

Please sign in to comment.