diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /fs/minix | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'fs/minix')
-rw-r--r-- | fs/minix/file.c | 2 | ||||
-rw-r--r-- | fs/minix/inode.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/fs/minix/file.c b/fs/minix/file.c index 4240f622e..6445c225c 100644 --- a/fs/minix/file.c +++ b/fs/minix/file.c @@ -53,8 +53,6 @@ static struct file_operations minix_file_operations = { NULL, /* release */ minix_sync_file, /* fsync */ NULL, /* fasync */ - NULL, /* check_media_change */ - NULL /* revalidate */ }; struct inode_operations minix_file_inode_operations = { diff --git a/fs/minix/inode.c b/fs/minix/inode.c index 6cc9522fa..66582c216 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -177,6 +177,7 @@ static struct super_block *minix_read_super(struct super_block *s, void *data, kdev_t dev = s->s_dev; const char * errmsg; struct inode *root_inode; + unsigned int hblock; /* N.B. These should be compile-time tests. Unfortunately that is impossible. */ @@ -186,6 +187,11 @@ static struct super_block *minix_read_super(struct super_block *s, void *data, panic("bad V2 i-node size"); MOD_INC_USE_COUNT; + + hblock = get_hardblocksize(dev); + if (hblock && hblock > BLOCK_SIZE) + goto out_bad_hblock; + lock_super(s); set_blocksize(dev, BLOCK_SIZE); if (!(bh = bread(dev,1,BLOCK_SIZE))) @@ -322,11 +328,16 @@ out_no_fs: brelse(bh); goto out_unlock; +out_bad_hblock: + printk("MINIX-fs: blocksize too small for device.\n"); + goto out; + out_bad_sb: printk("MINIX-fs: unable to read superblock\n"); out_unlock: - s->s_dev = 0; unlock_super(s); + out: + s->s_dev = 0; MOD_DEC_USE_COUNT; return NULL; } |