[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1226053376.3542.8.camel@frecb007923.frec.bull.fr>
Date: Fri, 07 Nov 2008 11:22:56 +0100
From: Frédéric Bohé <frederic.bohe@...l.net>
To: linux-ext4 <linux-ext4@...r.kernel.org>
Subject: [PATCH] ext4: add checksum calculation when clearing UNINIT flag
From: Frederic Bohe <frederic.bohe@...l.net>
Block group's checksum need to be re-calculated during the
initialization of an UNINIT'd group. This fix a race when several
threads try to allocate a new inode in an UNINIT'd group.
Signed-off-by: Frederic Bohe <frederic.bohe@...l.net>
---
ialloc.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux/fs/ext4/ialloc.c
===================================================================
--- linux.orig/fs/ext4/ialloc.c 2008-11-06 17:22:14.000000000 +0100
+++ linux/fs/ext4/ialloc.c 2008-11-07 10:43:41.000000000 +0100
@@ -718,6 +718,8 @@ got:
gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
free = ext4_free_blocks_after_init(sb, group, gdp);
gdp->bg_free_blocks_count = cpu_to_le16(free);
+ gdp->bg_checksum = ext4_group_desc_csum(sbi, group,
+ gdp);
}
spin_unlock(sb_bgl_lock(sbi, group));
--
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists