More patch description fixups. Standardize case.
[ext4-patch-queue.git] / jbd2-sparse-warning-fixes.patch
blob048b06aef7a19bb6948fbdad61b29b47034b2e02
1 jbd2: sparse pointer use of zero as null
3 From: Mingming Cao <cmm@us.ibm.com>
5 Get rid of sparse related warnings from places that use integer as NULL
6 pointer. (Ported from upstream ext3/jbd changes.)
8 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
9 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 ---
13 ---
14 fs/jbd2/transaction.c | 12 ++++++------
15 1 file changed, 6 insertions(+), 6 deletions(-)
17 Index: linux-2.6.24-rc7/fs/jbd2/transaction.c
18 ===================================================================
19 --- linux-2.6.24-rc7.orig/fs/jbd2/transaction.c 2008-01-16 17:49:48.000000000 -0800
20 +++ linux-2.6.24-rc7/fs/jbd2/transaction.c 2008-01-16 18:06:33.000000000 -0800
21 @@ -1182,7 +1182,7 @@ int jbd2_journal_dirty_metadata(handle_t
24 /* That test should have eliminated the following case: */
25 - J_ASSERT_JH(jh, jh->b_frozen_data == 0);
26 + J_ASSERT_JH(jh, jh->b_frozen_data == NULL);
28 JBUFFER_TRACE(jh, "file as BJ_Metadata");
29 spin_lock(&journal->j_list_lock);
30 @@ -1532,7 +1532,7 @@ void __jbd2_journal_temp_unlink_buffer(s
32 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types);
33 if (jh->b_jlist != BJ_None)
34 - J_ASSERT_JH(jh, transaction != 0);
35 + J_ASSERT_JH(jh, transaction != NULL);
37 switch (jh->b_jlist) {
38 case BJ_None:
39 @@ -1601,11 +1601,11 @@ __journal_try_to_free_buffer(journal_t *
40 if (buffer_locked(bh) || buffer_dirty(bh))
41 goto out;
43 - if (jh->b_next_transaction != 0)
44 + if (jh->b_next_transaction != NULL)
45 goto out;
47 spin_lock(&journal->j_list_lock);
48 - if (jh->b_transaction != 0 && jh->b_cp_transaction == 0) {
49 + if (jh->b_transaction != NULL && jh->b_cp_transaction == NULL) {
50 if (jh->b_jlist == BJ_SyncData || jh->b_jlist == BJ_Locked) {
51 /* A written-back ordered data buffer */
52 JBUFFER_TRACE(jh, "release data");
53 @@ -1613,7 +1613,7 @@ __journal_try_to_free_buffer(journal_t *
54 jbd2_journal_remove_journal_head(bh);
55 __brelse(bh);
57 - } else if (jh->b_cp_transaction != 0 && jh->b_transaction == 0) {
58 + } else if (jh->b_cp_transaction != NULL && jh->b_transaction == NULL) {
59 /* written-back checkpointed metadata buffer */
60 if (jh->b_jlist == BJ_None) {
61 JBUFFER_TRACE(jh, "remove from checkpoint list");
62 @@ -1973,7 +1973,7 @@ void __jbd2_journal_file_buffer(struct j
64 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types);
65 J_ASSERT_JH(jh, jh->b_transaction == transaction ||
66 - jh->b_transaction == 0);
67 + jh->b_transaction == NULL);
69 if (jh->b_transaction && jh->b_jlist == jlist)
70 return;