Commit 8616e30b authored by Linus Torvalds's avatar Linus Torvalds

Clean up BDEV type handling

parent 17242ce9
...@@ -651,10 +651,14 @@ int blkdev_put(struct block_device *bdev, int kind) ...@@ -651,10 +651,14 @@ int blkdev_put(struct block_device *bdev, int kind)
down(&bdev->bd_sem); down(&bdev->bd_sem);
lock_kernel(); lock_kernel();
if (kind == BDEV_FILE) switch (kind) {
case BDEV_FILE:
__block_fsync(bd_inode); __block_fsync(bd_inode);
else if (kind == BDEV_FS) break;
case BDEV_FS:
fsync_no_super(bdev); fsync_no_super(bdev);
break;
}
if (!--bdev->bd_openers) if (!--bdev->bd_openers)
kill_bdev(bdev); kill_bdev(bdev);
if (bdev->bd_op->release) if (bdev->bd_op->release)
......
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