aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:06 -0500
commitf99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch)
tree41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/jbd
parent6044ec8882c726e325017bd948aa0cd94ad33abc (diff)
[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.c6
-rw-r--r--fs/jbd/transaction.c9
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)
261 struct buffer_head *bh = jh2bh(jh); 261 struct buffer_head *bh = jh2bh(jh);
262 262
263 jbd_lock_bh_state(bh); 263 jbd_lock_bh_state(bh);
264 if (jh->b_committed_data) { 264 kfree(jh->b_committed_data);
265 kfree(jh->b_committed_data); 265 jh->b_committed_data = NULL;
266 jh->b_committed_data = NULL;
267 }
268 jbd_unlock_bh_state(bh); 266 jbd_unlock_bh_state(bh);
269 } 267 }
270 journal_refile_buffer(journal, jh); 268 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:
227 spin_unlock(&transaction->t_handle_lock); 227 spin_unlock(&transaction->t_handle_lock);
228 spin_unlock(&journal->j_state_lock); 228 spin_unlock(&journal->j_state_lock);
229out: 229out:
230 if (new_transaction) 230 kfree(new_transaction);
231 kfree(new_transaction);
232 return ret; 231 return ret;
233} 232}
234 233
@@ -725,8 +724,7 @@ done:
725 journal_cancel_revoke(handle, jh); 724 journal_cancel_revoke(handle, jh);
726 725
727out: 726out:
728 if (frozen_buffer) 727 kfree(frozen_buffer);
729 kfree(frozen_buffer);
730 728
731 JBUFFER_TRACE(jh, "exit"); 729 JBUFFER_TRACE(jh, "exit");
732 return error; 730 return error;
@@ -905,8 +903,7 @@ repeat:
905 jbd_unlock_bh_state(bh); 903 jbd_unlock_bh_state(bh);
906out: 904out:
907 journal_put_journal_head(jh); 905 journal_put_journal_head(jh);
908 if (committed_data) 906 kfree(committed_data);
909 kfree(committed_data);
910 return err; 907 return err;
911} 908}
912 909