X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fpatches%2Fext3-mballoc3-core.patch;h=07b07649cd735567a49c137daeeed0e89595154f;hb=dff7551a5d1aea75f0ef091f3efc8c0f76d3ca00;hp=a6033d1d19151df3f57cc701c141af6f7fffa5e9;hpb=d2d56f38da01001c92a09afc6b52b5acbd9bc13c;p=fs%2Flustre-release.git diff --git a/lustre/kernel_patches/patches/ext3-mballoc3-core.patch b/lustre/kernel_patches/patches/ext3-mballoc3-core.patch index a6033d1..07b0764 100644 --- a/lustre/kernel_patches/patches/ext3-mballoc3-core.patch +++ b/lustre/kernel_patches/patches/ext3-mballoc3-core.patch @@ -107,7 +107,7 @@ Index: linux-2.6.9-full/include/linux/ext3_fs.h +#ifdef __LITTLE_ENDIAN +#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off)) +#else -+#error "mballoc needs a patch for big-endian systems - CFS bug 10634" ++#error "mballoc needs a patch for big-endian systems - Lustre bug 10634" +#endif /* __LITTLE_ENDIAN */ +#endif /* !ext2_find_next_le_bit */ + @@ -183,9 +183,9 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c =================================================================== --- linux-2.6.9-full.orig/fs/ext3/mballoc.c 2007-02-13 18:39:59.640066087 +0300 +++ linux-2.6.9-full/fs/ext3/mballoc.c 2007-03-29 00:28:40.000000000 +0400 -@@ -0,0 +1,4342 @@ +@@ -0,0 +1,4343 @@ +/* -+ * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com ++ * Copyright 2008 Sun Microsystems, Inc. + * Written by Alex Tomas + * + * This program is free software; you can redistribute it and/or modify @@ -2361,7 +2361,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c + spin_lock_init(&sbi->s_mb_history_lock); + i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history); + sbi->s_mb_history = kmalloc(i, GFP_KERNEL); -+ memset(sbi->s_mb_history, 0, i); ++ if (likely(sbi->s_mb_history != NULL)) ++ memset(sbi->s_mb_history, 0, i); + /* if we can't allocate history, then we simple won't use it */ +} + @@ -2371,7 +2372,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c + struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb); + struct ext3_mb_history h; + -+ if (likely(sbi->s_mb_history == NULL)) ++ if (unlikely(sbi->s_mb_history == NULL)) + return; + + if (!(ac->ac_op & sbi->s_mb_history_filter))