diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 01:01:34 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 07:54:06 -0800 |
commit | f99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch) | |
tree | 41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/jbd | |
parent | 6044ec8882c726e325017bd948aa0cd94ad33abc (diff) | |
download | linux-f99d49adf527fa6f7a9c42257fa76bca6b8df1e3.tar.gz linux-f99d49adf527fa6f7a9c42257fa76bca6b8df1e3.tar.bz2 linux-f99d49adf527fa6f7a9c42257fa76bca6b8df1e3.zip |
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in fs/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/commit.c | 6 | ||||
-rw-r--r-- | fs/jbd/transaction.c | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 2a3e310f79ef..002ad2bbc769 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -261,10 +261,8 @@ void journal_commit_transaction(journal_t *journal) struct buffer_head *bh = jh2bh(jh); jbd_lock_bh_state(bh); - if (jh->b_committed_data) { - kfree(jh->b_committed_data); - jh->b_committed_data = NULL; - } + kfree(jh->b_committed_data); + jh->b_committed_data = NULL; jbd_unlock_bh_state(bh); } journal_refile_buffer(journal, jh); diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 13cb05bf6048..429f4b263cf1 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -227,8 +227,7 @@ repeat_locked: spin_unlock(&transaction->t_handle_lock); spin_unlock(&journal->j_state_lock); out: - if (new_transaction) - kfree(new_transaction); + kfree(new_transaction); return ret; } @@ -725,8 +724,7 @@ done: journal_cancel_revoke(handle, jh); out: - if (frozen_buffer) - kfree(frozen_buffer); + kfree(frozen_buffer); JBUFFER_TRACE(jh, "exit"); return error; @@ -905,8 +903,7 @@ repeat: jbd_unlock_bh_state(bh); out: journal_put_journal_head(jh); - if (committed_data) - kfree(committed_data); + kfree(committed_data); return err; } |