diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-28 16:21:56 -0800 |
|---|---|---|
| committer | Jens Axboe <axboe@suse.de> | 2002-10-28 16:21:56 -0800 |
| commit | f596aeef33216568838b32a0bd47273ff60e57d7 (patch) | |
| tree | 2ee4ccd2de4709cdc3f28da1fac5ae3677c279cd | |
| parent | ba3d641992e84856cfc675f89915c4fff8f2fdc4 (diff) | |
[PATCH] blkdev_get_block fix
Patch from Hugh Dickins <hugh@veritas.com>
Fix premature -EIO from blkdev_get_block: bdget initialize
bd_block_size consistent with bd_inode->i_blkbits (assigned by
new_inode). Otherwise, subsequent set_blocksize can find bd_block_size
doesn't need updating, and skip updating i_blkbits, leaving them
inconsistent.
| -rw-r--r-- | fs/block_dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 588055375f01..b48d3cfe82e6 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -308,6 +308,7 @@ struct block_device *bdget(dev_t dev) new_bdev->bd_dev = dev; new_bdev->bd_contains = NULL; new_bdev->bd_inode = inode; + new_bdev->bd_block_size = (1 << inode->i_blkbits); new_bdev->bd_part_count = 0; new_bdev->bd_invalidated = 0; inode->i_mode = S_IFBLK; |
