Commit 53b15b86 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] bd_set_size i_size handling

We need to hold i_sem while running i_size_write().  But that seems like a
lot of fuss and deadlock potential.  So just write the dang thing.
parent eaaec5b5
...@@ -525,7 +525,8 @@ EXPORT_SYMBOL(check_disk_change); ...@@ -525,7 +525,8 @@ EXPORT_SYMBOL(check_disk_change);
static void bd_set_size(struct block_device *bdev, loff_t size) static void bd_set_size(struct block_device *bdev, loff_t size)
{ {
unsigned bsize = bdev_hardsect_size(bdev); unsigned bsize = bdev_hardsect_size(bdev);
i_size_write(bdev->bd_inode, size);
bdev->bd_inode->i_size = size;
while (bsize < PAGE_CACHE_SIZE) { while (bsize < PAGE_CACHE_SIZE) {
if (size & bsize) if (size & bsize)
break; break;
......
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