Whamcloud - gitweb
Branch b1_6
authoradilger <adilger>
Wed, 4 Jul 2007 20:05:53 +0000 (20:05 +0000)
committeradilger <adilger>
Wed, 4 Jul 2007 20:05:53 +0000 (20:05 +0000)
Fix check for s->history allocation NULL return.
b=11039
i=alex

ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch

index 90a9123..1964a6a 100644 (file)
@@ -2068,7 +2068,7 @@ Index: linux-2.6.16.i686/fs/ext3/mballoc.c
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->history == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index 135262a..ad07714 100644 (file)
@@ -2067,7 +2067,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->history == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index 4512098..f80b66e 100644 (file)
@@ -2086,7 +2086,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->history == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }