summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
commit95db6b748fc86297827fbd9c9ef174d491c9ad89 (patch)
tree27a92a942821cde1edda9a1b088718d436b3efe4 /fs/block_dev.c
parent45b27b0a0652331d104c953a5b192d843fff88f8 (diff)
Merge with Linux 2.3.40.
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index c32b8c0f2..0e34b95bd 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -298,7 +298,7 @@ ssize_t block_read(struct file * filp, char * buf, size_t count, loff_t *ppos)
* since the vma has no handle.
*/
-int block_fsync(struct file *filp, struct dentry *dentry)
+static int block_fsync(struct file *filp, struct dentry *dentry)
{
return fsync_dev(dentry->d_inode->i_rdev);
}
@@ -604,8 +604,11 @@ int blkdev_put(struct block_device *bdev, int kind)
kdev_t rdev = to_kdev_t(bdev->bd_dev); /* this should become bdev */
down(&bdev->bd_sem);
/* syncing will go here */
+ if (kind == BDEV_FILE || kind == BDEV_FS)
+ fsync_dev(rdev);
if (atomic_dec_and_test(&bdev->bd_openers)) {
/* invalidating buffers will go here */
+ invalidate_buffers(rdev);
}
if (bdev->bd_op->release) {
struct inode * fake_inode = get_empty_inode();