From: kalpak Date: Wed, 17 Oct 2007 21:53:29 +0000 (+0000) Subject: b=13454 X-Git-Tag: v1_7_0_51~605 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5c78640a83270402222a4cb73e553599dbe01c35 b=13454 i=adilger, johann Fix bug in jbd-stats patches spotted by coverity. --- 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 50fb6f5a..e7c178d 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 2660339..acd81f8 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 4db8dd3..0de0070 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 b2abf46..4873794 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 3847e1e..0140efd 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; + }