Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-02-09 06:18:13 -0800
committerDavid S. Miller <davem@redhat.com>2002-02-09 06:18:13 -0800
commit238358ed664c4a9243a62615a6afc00764234d17 (patch)
tree2a9d47d3e732fe81486c414d47fe5bc68940419c
parentd6b7a72c56ebd4583f61752e130ae5242b925a53 (diff)
[PATCH] affs cleanup
affs digs in blk_size[] to find the size of device (it has its analog of superblock living in the middle of disk). That information is available in ->s_bdev->bd_inode->i_size - no need to mess with major/minor/arrays to get it.
-rw-r--r--fs/affs/super.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 3d0b3824db45..f526b3fe5c75 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -270,9 +270,8 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
struct buffer_head *root_bh = NULL;
struct buffer_head *boot_bh;
struct inode *root_inode = NULL;
- kdev_t dev = sb->s_dev;
s32 root_block;
- int blocks, size, blocksize;
+ int size, blocksize;
u32 chksum;
int num_bm;
int i, j;
@@ -308,12 +307,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
* blocks, we will have to change it.
*/
- blocks = blk_size[major(dev)] ? blk_size[major(dev)][minor(dev)] : 0;
- if (!blocks) {
- printk(KERN_ERR "AFFS: Could not determine device size\n");
- goto out_error;
- }
- size = (BLOCK_SIZE / 512) * blocks;
+ size = sb->s_bdev->bd_inode->i_size >> 9;
pr_debug("AFFS: initial blksize=%d, blocks=%d\n", 512, blocks);
affs_set_blocksize(sb, PAGE_SIZE);