From: johann Date: Wed, 1 Jul 2009 20:46:04 +0000 (+0000) Subject: Branch b_release_1_8_1 X-Git-Tag: v1_8_0_190~10 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1df8a8e920bc106ed19549536f0542a47558ae2a;p=fs%2Flustre-release.git Branch b_release_1_8_1 b=19875 i=girish Fix ext4_free_inode() vs. ext4_claim_inode() race. Backport http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commit;h=7ce9d5d1f3c8736511daa413c64985a05b2feee3 --- diff --git a/ldiskfs/kernel_patches/patches/ext4-claim_inode-free_inode-race.patch b/ldiskfs/kernel_patches/patches/ext4-claim_inode-free_inode-race.patch new file mode 100644 index 0000000..c742b38 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-claim_inode-free_inode-race.patch @@ -0,0 +1,28 @@ +Index: linux-stage/fs/ext4/ialloc.c +=================================================================== +--- linux-stage.orig/fs/ext4/ialloc.c ++++ linux-stage/fs/ext4/ialloc.c +@@ -189,7 +189,7 @@ void ext4_free_inode(handle_t *handle, s + struct ext4_group_desc *gdp; + struct ext4_super_block *es; + struct ext4_sb_info *sbi; +- int fatal = 0, err, count; ++ int fatal = 0, err, count, cleared; + ext4_group_t flex_group; + + if (atomic_read(&inode->i_count) > 1) { +@@ -243,9 +243,12 @@ void ext4_free_inode(handle_t *handle, s + if (fatal) + goto error_return; + ++ ext4_lock_group(sb, block_group); ++ cleared = ext4_clear_bit(bit, bitmap_bh->b_data); ++ ext4_unlock_group(sb, block_group); ++ + /* Ok, now we can actually update the inode bitmaps.. */ +- if (!ext4_clear_bit_atomic(ext4_group_lock_ptr(sb, block_group), +- bit, bitmap_bh->b_data)) ++ if (!cleared) + ext4_error(sb, "ext4_free_inode", + "bit already cleared for inode %lu", ino); + else { diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series index ad9a0b3..b82357e 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series @@ -25,3 +25,4 @@ ext4-lustre-i_version.patch ext4-lock-cached_extent.patch ext4-convert-group-lock-sles11.patch ext4-force_over_8tb-sles11.patch +ext4-claim_inode-free_inode-race.patch