diff options
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, | |||
34 | return err; | 34 | return err; |
35 | } | 35 | } |
36 | 36 | ||
37 | int __ext4_journal_forget(const char *where, handle_t *handle, | ||
38 | struct buffer_head *bh) | ||
39 | { | ||
40 | int err = 0; | ||
41 | |||
42 | if (ext4_handle_valid(handle)) { | ||
43 | err = jbd2_journal_forget(handle, bh); | ||
44 | if (err) | ||
45 | ext4_journal_abort_handle(where, __func__, bh, | ||
46 | handle, err); | ||
47 | } | ||
48 | else | ||
49 | bforget(bh); | ||
50 | return err; | ||
51 | } | ||
52 | |||
53 | /* | 37 | /* |
54 | * The ext4 forget function must perform a revoke if we are freeing data | 38 | * The ext4 forget function must perform a revoke if we are freeing data |
55 | * which has been journaled. Metadata (eg. indirect blocks) must be | 39 | * 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, | |||
93 | (!is_metadata && !ext4_should_journal_data(inode))) { | 77 | (!is_metadata && !ext4_should_journal_data(inode))) { |
94 | if (bh) { | 78 | if (bh) { |
95 | BUFFER_TRACE(bh, "call jbd2_journal_forget"); | 79 | BUFFER_TRACE(bh, "call jbd2_journal_forget"); |
96 | return __ext4_journal_forget(where, handle, bh); | 80 | err = jbd2_journal_forget(handle, bh); |
81 | if (err) | ||
82 | ext4_journal_abort_handle(where, __func__, bh, | ||
83 | handle, err); | ||
84 | return err; | ||
97 | } | 85 | } |
98 | return 0; | 86 | return 0; |
99 | } | 87 | } |