Commit 1076d17ac70d1bb28fadc6f4bd96977b56897025
Committed by
Linus Torvalds
1 parent
af8be4e4b3
Exists in
master
and in
7 other branches
jbd/jbd2 NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 4 changed files with 12 additions and 12 deletions Side-by-side Diff
fs/jbd/journal.c
... | ... | @@ -1620,14 +1620,14 @@ |
1620 | 1620 | { |
1621 | 1621 | int retval; |
1622 | 1622 | |
1623 | - J_ASSERT(journal_head_cache == 0); | |
1623 | + J_ASSERT(journal_head_cache == NULL); | |
1624 | 1624 | journal_head_cache = kmem_cache_create("journal_head", |
1625 | 1625 | sizeof(struct journal_head), |
1626 | 1626 | 0, /* offset */ |
1627 | 1627 | SLAB_TEMPORARY, /* flags */ |
1628 | 1628 | NULL); /* ctor */ |
1629 | 1629 | retval = 0; |
1630 | - if (journal_head_cache == 0) { | |
1630 | + if (!journal_head_cache) { | |
1631 | 1631 | retval = -ENOMEM; |
1632 | 1632 | printk(KERN_EMERG "JBD: no memory for journal_head cache\n"); |
1633 | 1633 | } |
fs/jbd/revoke.c
... | ... | @@ -173,13 +173,13 @@ |
173 | 173 | 0, |
174 | 174 | SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY, |
175 | 175 | NULL); |
176 | - if (revoke_record_cache == 0) | |
176 | + if (!revoke_record_cache) | |
177 | 177 | return -ENOMEM; |
178 | 178 | |
179 | 179 | revoke_table_cache = kmem_cache_create("revoke_table", |
180 | 180 | sizeof(struct jbd_revoke_table_s), |
181 | 181 | 0, SLAB_TEMPORARY, NULL); |
182 | - if (revoke_table_cache == 0) { | |
182 | + if (!revoke_table_cache) { | |
183 | 183 | kmem_cache_destroy(revoke_record_cache); |
184 | 184 | revoke_record_cache = NULL; |
185 | 185 | return -ENOMEM; |
fs/jbd2/journal.c
... | ... | @@ -219,7 +219,7 @@ |
219 | 219 | if (IS_ERR(t)) |
220 | 220 | return PTR_ERR(t); |
221 | 221 | |
222 | - wait_event(journal->j_wait_done_commit, journal->j_task != 0); | |
222 | + wait_event(journal->j_wait_done_commit, journal->j_task != NULL); | |
223 | 223 | return 0; |
224 | 224 | } |
225 | 225 | |
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | while (journal->j_task) { |
232 | 232 | wake_up(&journal->j_wait_commit); |
233 | 233 | spin_unlock(&journal->j_state_lock); |
234 | - wait_event(journal->j_wait_done_commit, journal->j_task == 0); | |
234 | + wait_event(journal->j_wait_done_commit, journal->j_task == NULL); | |
235 | 235 | spin_lock(&journal->j_state_lock); |
236 | 236 | } |
237 | 237 | spin_unlock(&journal->j_state_lock); |
238 | 238 | |
... | ... | @@ -1969,14 +1969,14 @@ |
1969 | 1969 | { |
1970 | 1970 | int retval; |
1971 | 1971 | |
1972 | - J_ASSERT(jbd2_journal_head_cache == 0); | |
1972 | + J_ASSERT(jbd2_journal_head_cache == NULL); | |
1973 | 1973 | jbd2_journal_head_cache = kmem_cache_create("jbd2_journal_head", |
1974 | 1974 | sizeof(struct journal_head), |
1975 | 1975 | 0, /* offset */ |
1976 | 1976 | SLAB_TEMPORARY, /* flags */ |
1977 | 1977 | NULL); /* ctor */ |
1978 | 1978 | retval = 0; |
1979 | - if (jbd2_journal_head_cache == 0) { | |
1979 | + if (!jbd2_journal_head_cache) { | |
1980 | 1980 | retval = -ENOMEM; |
1981 | 1981 | printk(KERN_EMERG "JBD: no memory for journal_head cache\n"); |
1982 | 1982 | } |
1983 | 1983 | |
... | ... | @@ -2002,14 +2002,14 @@ |
2002 | 2002 | atomic_inc(&nr_journal_heads); |
2003 | 2003 | #endif |
2004 | 2004 | ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS); |
2005 | - if (ret == 0) { | |
2005 | + if (!ret) { | |
2006 | 2006 | jbd_debug(1, "out of memory for journal_head\n"); |
2007 | 2007 | if (time_after(jiffies, last_warning + 5*HZ)) { |
2008 | 2008 | printk(KERN_NOTICE "ENOMEM in %s, retrying.\n", |
2009 | 2009 | __FUNCTION__); |
2010 | 2010 | last_warning = jiffies; |
2011 | 2011 | } |
2012 | - while (ret == 0) { | |
2012 | + while (!ret) { | |
2013 | 2013 | yield(); |
2014 | 2014 | ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS); |
2015 | 2015 | } |
fs/jbd2/revoke.c
... | ... | @@ -174,13 +174,13 @@ |
174 | 174 | 0, |
175 | 175 | SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY, |
176 | 176 | NULL); |
177 | - if (jbd2_revoke_record_cache == 0) | |
177 | + if (!jbd2_revoke_record_cache) | |
178 | 178 | return -ENOMEM; |
179 | 179 | |
180 | 180 | jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table", |
181 | 181 | sizeof(struct jbd2_revoke_table_s), |
182 | 182 | 0, SLAB_TEMPORARY, NULL); |
183 | - if (jbd2_revoke_table_cache == 0) { | |
183 | + if (!jbd2_revoke_table_cache) { | |
184 | 184 | kmem_cache_destroy(jbd2_revoke_record_cache); |
185 | 185 | jbd2_revoke_record_cache = NULL; |
186 | 186 | return -ENOMEM; |