Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87918
b: refs/heads/master
c: 1076d17
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Mar 30, 2008
1 parent 6f0c8e8 commit a6fd893
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af8be4e4b316df36a00c1e52a9970c253783b57e
refs/heads/master: 1076d17ac70d1bb28fadc6f4bd96977b56897025
4 changes: 2 additions & 2 deletions trunk/fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,14 +1620,14 @@ static int journal_init_journal_head_cache(void)
{
int retval;

J_ASSERT(journal_head_cache == 0);
J_ASSERT(journal_head_cache == NULL);
journal_head_cache = kmem_cache_create("journal_head",
sizeof(struct journal_head),
0, /* offset */
SLAB_TEMPORARY, /* flags */
NULL); /* ctor */
retval = 0;
if (journal_head_cache == 0) {
if (!journal_head_cache) {
retval = -ENOMEM;
printk(KERN_EMERG "JBD: no memory for journal_head cache\n");
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/jbd/revoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ int __init journal_init_revoke_caches(void)
0,
SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY,
NULL);
if (revoke_record_cache == 0)
if (!revoke_record_cache)
return -ENOMEM;

revoke_table_cache = kmem_cache_create("revoke_table",
sizeof(struct jbd_revoke_table_s),
0, SLAB_TEMPORARY, NULL);
if (revoke_table_cache == 0) {
if (!revoke_table_cache) {
kmem_cache_destroy(revoke_record_cache);
revoke_record_cache = NULL;
return -ENOMEM;
Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static int jbd2_journal_start_thread(journal_t *journal)
if (IS_ERR(t))
return PTR_ERR(t);

wait_event(journal->j_wait_done_commit, journal->j_task != 0);
wait_event(journal->j_wait_done_commit, journal->j_task != NULL);
return 0;
}

Expand All @@ -231,7 +231,7 @@ static void journal_kill_thread(journal_t *journal)
while (journal->j_task) {
wake_up(&journal->j_wait_commit);
spin_unlock(&journal->j_state_lock);
wait_event(journal->j_wait_done_commit, journal->j_task == 0);
wait_event(journal->j_wait_done_commit, journal->j_task == NULL);
spin_lock(&journal->j_state_lock);
}
spin_unlock(&journal->j_state_lock);
Expand Down Expand Up @@ -1969,14 +1969,14 @@ static int journal_init_jbd2_journal_head_cache(void)
{
int retval;

J_ASSERT(jbd2_journal_head_cache == 0);
J_ASSERT(jbd2_journal_head_cache == NULL);
jbd2_journal_head_cache = kmem_cache_create("jbd2_journal_head",
sizeof(struct journal_head),
0, /* offset */
SLAB_TEMPORARY, /* flags */
NULL); /* ctor */
retval = 0;
if (jbd2_journal_head_cache == 0) {
if (!jbd2_journal_head_cache) {
retval = -ENOMEM;
printk(KERN_EMERG "JBD: no memory for journal_head cache\n");
}
Expand All @@ -2002,14 +2002,14 @@ static struct journal_head *journal_alloc_journal_head(void)
atomic_inc(&nr_journal_heads);
#endif
ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS);
if (ret == 0) {
if (!ret) {
jbd_debug(1, "out of memory for journal_head\n");
if (time_after(jiffies, last_warning + 5*HZ)) {
printk(KERN_NOTICE "ENOMEM in %s, retrying.\n",
__FUNCTION__);
last_warning = jiffies;
}
while (ret == 0) {
while (!ret) {
yield();
ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/jbd2/revoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ int __init jbd2_journal_init_revoke_caches(void)
0,
SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY,
NULL);
if (jbd2_revoke_record_cache == 0)
if (!jbd2_revoke_record_cache)
return -ENOMEM;

jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
sizeof(struct jbd2_revoke_table_s),
0, SLAB_TEMPORARY, NULL);
if (jbd2_revoke_table_cache == 0) {
if (!jbd2_revoke_table_cache) {
kmem_cache_destroy(jbd2_revoke_record_cache);
jbd2_revoke_record_cache = NULL;
return -ENOMEM;
Expand Down

0 comments on commit a6fd893

Please sign in to comment.