From 5c78640a83270402222a4cb73e553599dbe01c35 Mon Sep 17 00:00:00 2001
From: kalpak <kalpak>
Date: Wed, 17 Oct 2007 21:53:29 +0000
Subject: [PATCH] b=13454 i=adilger, johann

Fix bug in jbd-stats patches spotted by coverity.
---
 lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch  | 4 ++--
 lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch | 4 ++--
 lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch   | 4 ++--
 lustre/kernel_patches/patches/jbd-stats-2.6.5.patch      | 4 ++--
 lustre/kernel_patches/patches/jbd-stats-2.6.9.patch      | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
index 50fb6f5a87..e7c178dae8 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
@@ -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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
index 2660339bd0..acd81f8c28 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
@@ -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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
index 4db8dd3879..0de0070c6e 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
@@ -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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
index b2abf46e03..4873794e12 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
@@ -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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
index 3847e1e499..0140efdb19 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
@@ -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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		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);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
-- 
GitLab