mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6044ec8882
commit
f99d49adf5
39 changed files with 137 additions and 245 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue