Whamcloud - gitweb
b=13454
authorkalpak <kalpak>
Wed, 17 Oct 2007 21:53:29 +0000 (21:53 +0000)
committerkalpak <kalpak>
Wed, 17 Oct 2007 21:53:29 +0000 (21:53 +0000)
i=adilger, johann

Fix bug in jbd-stats patches spotted by coverity.

lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
lustre/kernel_patches/patches/jbd-stats-2.6.9.patch

index 50fb6f5..e7c178d 100644 (file)
@@ -269,7 +269,7 @@ Index: linux-2.6.18-8.1.8/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -369,7 +369,7 @@ Index: linux-2.6.18-8.1.8/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index 2660339..acd81f8 100644 (file)
@@ -269,7 +269,7 @@ Index: linux-2.6.16.46-0.14/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -369,7 +369,7 @@ Index: linux-2.6.16.46-0.14/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index 4db8dd3..0de0070 100644 (file)
@@ -269,7 +269,7 @@ Index: linux-2.6.13.4/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -369,7 +369,7 @@ Index: linux-2.6.13.4/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index b2abf46..4873794 100644 (file)
@@ -459,7 +459,7 @@ Index: linux-2.6.5-7.201/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -578,7 +578,7 @@ Index: linux-2.6.5-7.201/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
index 3847e1e..0140efd 100644 (file)
@@ -460,7 +460,7 @@ Index: linux-2.6.9/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -560,7 +560,7 @@ Index: linux-2.6.9/fs/jbd/journal.c
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
 +              return -EIO;
 +      size = sizeof(struct transaction_stats_s);
 +      s->stats = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->stats == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
 +              kfree(s);
 +              return -EIO;
 +      }