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()
109 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) in __ext4_journal_stop() argument
115 if (!ext4_handle_valid(handle)) { in __ext4_journal_stop()
116 ext4_put_nojournal(handle); in __ext4_journal_stop()
120 err = handle->h_err; in __ext4_journal_stop()
121 if (!handle->h_transaction) { in __ext4_journal_stop()
122 rc = jbd2_journal_stop(handle); in __ext4_journal_stop()
126 sb = handle->h_transaction->t_journal->j_private; in __ext4_journal_stop()
127 rc = jbd2_journal_stop(handle); in __ext4_journal_stop()
136 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line, in __ext4_journal_start_reserved() argument
142 if (!ext4_handle_valid(handle)) in __ext4_journal_start_reserved()
145 sb = handle->h_journal->j_private; in __ext4_journal_start_reserved()
147 jbd2_handle_buffer_credits(handle), _RET_IP_); in __ext4_journal_start_reserved()
150 jbd2_journal_free_reserved(handle); in __ext4_journal_start_reserved()
154 err = jbd2_journal_start_reserved(handle, type, line); in __ext4_journal_start_reserved()
157 return handle; in __ext4_journal_start_reserved()
160 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred, in __ext4_journal_ensure_credits() argument
163 if (!ext4_handle_valid(handle)) in __ext4_journal_ensure_credits()
165 if (jbd2_handle_buffer_credits(handle) >= check_cred && in __ext4_journal_ensure_credits()
166 handle->h_revoke_credits >= revoke_cred) in __ext4_journal_ensure_credits()
168 extend_cred = max(0, extend_cred - jbd2_handle_buffer_credits(handle)); in __ext4_journal_ensure_credits()
169 revoke_cred = max(0, revoke_cred - handle->h_revoke_credits); in __ext4_journal_ensure_credits()
170 return ext4_journal_extend(handle, extend_cred, revoke_cred); in __ext4_journal_ensure_credits()
176 handle_t *handle, int err) in ext4_journal_abort_handle() argument
181 BUG_ON(!ext4_handle_valid(handle)); in ext4_journal_abort_handle()
186 if (!handle->h_err) in ext4_journal_abort_handle()
187 handle->h_err = err; in ext4_journal_abort_handle()
189 if (is_handle_aborted(handle)) in ext4_journal_abort_handle()
195 jbd2_journal_abort_handle(handle); in ext4_journal_abort_handle()
221 handle_t *handle, struct super_block *sb, in __ext4_journal_get_write_access() argument
232 if (ext4_handle_valid(handle)) { in __ext4_journal_get_write_access()
233 err = jbd2_journal_get_write_access(handle, bh); in __ext4_journal_get_write_access()
236 handle, err); in __ext4_journal_get_write_access()
257 int __ext4_forget(const char *where, unsigned int line, handle_t *handle, in __ext4_forget() argument
274 if (!ext4_handle_valid(handle)) { in __ext4_forget()
288 err = jbd2_journal_forget(handle, bh); in __ext4_forget()
291 bh, handle, err); in __ext4_forget()
301 err = jbd2_journal_revoke(handle, blocknr, bh); in __ext4_forget()
304 bh, handle, err); in __ext4_forget()
313 handle_t *handle, struct super_block *sb, in __ext4_journal_get_create_access() argument
319 if (!ext4_handle_valid(handle)) in __ext4_journal_get_create_access()
322 err = jbd2_journal_get_create_access(handle, bh); in __ext4_journal_get_create_access()
324 ext4_journal_abort_handle(where, line, __func__, bh, handle, in __ext4_journal_get_create_access()
337 handle_t *handle, struct inode *inode, in __ext4_handle_dirty_metadata() argument
347 if (ext4_handle_valid(handle)) { in __ext4_handle_dirty_metadata()
348 err = jbd2_journal_dirty_metadata(handle, bh); in __ext4_handle_dirty_metadata()
350 if (!is_handle_aborted(handle) && WARN_ON_ONCE(err)) { in __ext4_handle_dirty_metadata()
352 handle, err); in __ext4_handle_dirty_metadata()
357 handle->h_type, in __ext4_handle_dirty_metadata()
358 handle->h_line_no, in __ext4_handle_dirty_metadata()
359 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
360 jbd2_handle_buffer_credits(handle), err); in __ext4_handle_dirty_metadata()
368 handle->h_type, in __ext4_handle_dirty_metadata()
369 handle->h_line_no, in __ext4_handle_dirty_metadata()
370 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
371 jbd2_handle_buffer_credits(handle), in __ext4_handle_dirty_metadata()