From 5b9b6cb7442c308a32432232902e0dfaabe785f0 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Thu, 14 Aug 2008 18:43:59 -0400 Subject: [PATCH] --- yaml --- r: 207738 b: refs/heads/master c: 9442e54f433eff9b6fbd0836611df4c1919df370 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/omfs/inode.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b81c7a30c929..a88a29c9d8fe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f068272cb2f134a194b93e94a8e0672bfce48cd8 +refs/heads/master: 9442e54f433eff9b6fbd0836611df4c1919df370 diff --git a/trunk/fs/omfs/inode.c b/trunk/fs/omfs/inode.c index bd4bf753a63b..0af5d0af9f32 100644 --- a/trunk/fs/omfs/inode.c +++ b/trunk/fs/omfs/inode.c @@ -509,6 +509,15 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent) goto out_brelse_bh2; } + if (sbi->s_bitmap_ino != ~0ULL && + sbi->s_bitmap_ino > sbi->s_num_blocks) { + printk(KERN_ERR "omfs: free space bitmap location is corrupt " + "(%llx, total blocks %llx)\n", + (unsigned long long) sbi->s_bitmap_ino, + (unsigned long long) sbi->s_num_blocks); + goto out_brelse_bh2; + } + ret = omfs_get_imap(sb); if (ret) goto out_brelse_bh2;