Lines Matching refs:handle
35 handle_t *handle = current->journal_info; in ext4_get_nojournal() local
36 unsigned long ref_cnt = (unsigned long)handle; in ext4_get_nojournal()
41 handle = (handle_t *)ref_cnt; in ext4_get_nojournal()
43 current->journal_info = handle; in ext4_get_nojournal()
44 return handle; in ext4_get_nojournal()
49 static void ext4_put_nojournal(handle_t *handle) in ext4_put_nojournal() argument
51 unsigned long ref_cnt = (unsigned long)handle; in ext4_put_nojournal()
56 handle = (handle_t *)ref_cnt; in ext4_put_nojournal()
58 current->journal_info = handle; in ext4_put_nojournal()
116 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) in __ext4_journal_stop() argument
122 if (!ext4_handle_valid(handle)) { in __ext4_journal_stop()
123 ext4_put_nojournal(handle); in __ext4_journal_stop()
127 err = handle->h_err; in __ext4_journal_stop()
128 if (!handle->h_transaction) { in __ext4_journal_stop()
129 rc = jbd2_journal_stop(handle); in __ext4_journal_stop()
133 sb = handle->h_transaction->t_journal->j_private; in __ext4_journal_stop()
134 rc = jbd2_journal_stop(handle); in __ext4_journal_stop()
143 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line, in __ext4_journal_start_reserved() argument
149 if (!ext4_handle_valid(handle)) in __ext4_journal_start_reserved()
152 sb = handle->h_journal->j_private; in __ext4_journal_start_reserved()
154 jbd2_handle_buffer_credits(handle), _RET_IP_); in __ext4_journal_start_reserved()
157 jbd2_journal_free_reserved(handle); in __ext4_journal_start_reserved()
161 err = jbd2_journal_start_reserved(handle, type, line); in __ext4_journal_start_reserved()
164 return handle; in __ext4_journal_start_reserved()
167 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred, in __ext4_journal_ensure_credits() argument
170 if (!ext4_handle_valid(handle)) in __ext4_journal_ensure_credits()
172 if (is_handle_aborted(handle)) in __ext4_journal_ensure_credits()
174 if (jbd2_handle_buffer_credits(handle) >= check_cred && in __ext4_journal_ensure_credits()
175 handle->h_revoke_credits >= revoke_cred) in __ext4_journal_ensure_credits()
177 extend_cred = max(0, extend_cred - jbd2_handle_buffer_credits(handle)); in __ext4_journal_ensure_credits()
178 revoke_cred = max(0, revoke_cred - handle->h_revoke_credits); in __ext4_journal_ensure_credits()
179 return ext4_journal_extend(handle, extend_cred, revoke_cred); in __ext4_journal_ensure_credits()
185 handle_t *handle, int err) in ext4_journal_abort_handle() argument
190 BUG_ON(!ext4_handle_valid(handle)); in ext4_journal_abort_handle()
195 if (!handle->h_err) in ext4_journal_abort_handle()
196 handle->h_err = err; in ext4_journal_abort_handle()
198 if (is_handle_aborted(handle)) in ext4_journal_abort_handle()
204 jbd2_journal_abort_handle(handle); in ext4_journal_abort_handle()
230 handle_t *handle, struct super_block *sb, in __ext4_journal_get_write_access() argument
240 if (ext4_handle_valid(handle)) { in __ext4_journal_get_write_access()
241 err = jbd2_journal_get_write_access(handle, bh); in __ext4_journal_get_write_access()
244 handle, err); in __ext4_journal_get_write_access()
265 int __ext4_forget(const char *where, unsigned int line, handle_t *handle, in __ext4_forget() argument
281 if (!ext4_handle_valid(handle)) { in __ext4_forget()
295 err = jbd2_journal_forget(handle, bh); in __ext4_forget()
298 bh, handle, err); in __ext4_forget()
308 err = jbd2_journal_revoke(handle, blocknr, bh); in __ext4_forget()
311 bh, handle, err); in __ext4_forget()
320 handle_t *handle, struct super_block *sb, in __ext4_journal_get_create_access() argument
326 if (!ext4_handle_valid(handle)) in __ext4_journal_get_create_access()
329 err = jbd2_journal_get_create_access(handle, bh); in __ext4_journal_get_create_access()
331 ext4_journal_abort_handle(where, line, __func__, bh, handle, in __ext4_journal_get_create_access()
344 handle_t *handle, struct inode *inode, in __ext4_handle_dirty_metadata() argument
354 if (ext4_handle_valid(handle)) { in __ext4_handle_dirty_metadata()
355 err = jbd2_journal_dirty_metadata(handle, bh); in __ext4_handle_dirty_metadata()
357 if (!is_handle_aborted(handle) && WARN_ON_ONCE(err)) { in __ext4_handle_dirty_metadata()
359 handle, err); in __ext4_handle_dirty_metadata()
364 handle->h_type, in __ext4_handle_dirty_metadata()
365 handle->h_line_no, in __ext4_handle_dirty_metadata()
366 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
367 jbd2_handle_buffer_credits(handle), err); in __ext4_handle_dirty_metadata()
375 handle->h_type, in __ext4_handle_dirty_metadata()
376 handle->h_line_no, in __ext4_handle_dirty_metadata()
377 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
378 jbd2_handle_buffer_credits(handle), in __ext4_handle_dirty_metadata()