diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-11-23 03:00:13 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-11-23 03:00:13 +0100 |
commit | b7e57e7c2a41826e51fe060fae5158bfc7a04e81 (patch) | |
tree | 2c7331402c731a9c6bb98827a4f6e5926fd90055 /fs/ext4/ext4_jbd2.c | |
parent | ext4: fold ext4_journal_revoke() into ext4_forget() (diff) | |
download | linux-b7e57e7c2a41826e51fe060fae5158bfc7a04e81.tar.xz linux-b7e57e7c2a41826e51fe060fae5158bfc7a04e81.zip |
ext4: fold ext4_journal_forget() into ext4_forget()
Convert the last two callers of ext4_journal_forget() to use
ext4_forget() instead, and then fold ext4_journal_forget() into
ext4_forget(). This reduces are code complexity and shortens our call
stack.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 92c88a8f734d..b57e5c711b6d 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -34,22 +34,6 @@ int __ext4_journal_get_write_access(const char *where, handle_t *handle, return err; } -int __ext4_journal_forget(const char *where, handle_t *handle, - struct buffer_head *bh) -{ - int err = 0; - - if (ext4_handle_valid(handle)) { - err = jbd2_journal_forget(handle, bh); - if (err) - ext4_journal_abort_handle(where, __func__, bh, - handle, err); - } - else - bforget(bh); - return err; -} - /* * The ext4 forget function must perform a revoke if we are freeing data * which has been journaled. Metadata (eg. indirect blocks) must be @@ -93,7 +77,11 @@ int __ext4_forget(const char *where, handle_t *handle, int is_metadata, (!is_metadata && !ext4_should_journal_data(inode))) { if (bh) { BUFFER_TRACE(bh, "call jbd2_journal_forget"); - return __ext4_journal_forget(where, handle, bh); + err = jbd2_journal_forget(handle, bh); + if (err) + ext4_journal_abort_handle(where, __func__, bh, + handle, err); + return err; } return 0; } |