From c1cbdacfc3244e1719ce1774efa98ca632e413b1 Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Mon, 1 Aug 2011 17:41:39 -0400 Subject: [PATCH] --- yaml --- r: 262138 b: refs/heads/master c: 48e6061bf4bb25eec151b91f22fd90a5b9a4920a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/mballoc.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index deb165a8e3b0..39a016765d55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9d8b9ec44234b2f6e0225300632d250210c04f11 +refs/heads/master: 48e6061bf4bb25eec151b91f22fd90a5b9a4920a diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index 70d1b3e64284..e41620b56e53 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -2342,7 +2342,11 @@ static int ext4_mb_init_backend(struct super_block *sb) ext4_msg(sb, KERN_ERR, "can't get new inode"); goto err_freesgi; } - sbi->s_buddy_cache->i_ino = get_next_ino(); + /* To avoid potentially colliding with an valid on-disk inode number, + * use EXT4_BAD_INO for the buddy cache inode number. This inode is + * not in the inode hash, so it should never be found by iget(), but + * this will avoid confusion if it ever shows up during debugging. */ + sbi->s_buddy_cache->i_ino = EXT4_BAD_INO; EXT4_I(sbi->s_buddy_cache)->i_disksize = 0; for (i = 0; i < ngroups; i++) { desc = ext4_get_group_desc(sb, i, NULL);