Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172920
b: refs/heads/master
c: ab0a973
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Oct 29, 2009
1 parent a98259f commit d426ed9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: b9d128f1088ea5245109dfc9bbceb128b6371a77
refs/heads/master: ab0a9735e06914ce4d2a94ffa41497dbc142fe7f
12 changes: 11 additions & 1 deletion trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,17 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin)

static int block_fsync(struct file *filp, struct dentry *dentry, int datasync)
{
return sync_blockdev(I_BDEV(filp->f_mapping->host));
struct block_device *bdev = I_BDEV(filp->f_mapping->host);
int error;

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

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

/*
Expand Down

0 comments on commit d426ed9

Please sign in to comment.