Lines Matching full:handle
32 /* Just increment the non-pointer handle value */
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()
48 /* Decrement the non-pointer handle value */
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 (is_handle_aborted(handle)) in __ext4_journal_ensure_credits()
167 if (jbd2_handle_buffer_credits(handle) >= check_cred && in __ext4_journal_ensure_credits()
168 handle->h_revoke_credits >= revoke_cred) in __ext4_journal_ensure_credits()
170 extend_cred = max(0, extend_cred - jbd2_handle_buffer_credits(handle)); in __ext4_journal_ensure_credits()
171 revoke_cred = max(0, revoke_cred - handle->h_revoke_credits); in __ext4_journal_ensure_credits()
172 return ext4_journal_extend(handle, extend_cred, revoke_cred); in __ext4_journal_ensure_credits()
178 handle_t *handle, int err) in ext4_journal_abort_handle() argument
183 BUG_ON(!ext4_handle_valid(handle)); in ext4_journal_abort_handle()
188 if (!handle->h_err) in ext4_journal_abort_handle()
189 handle->h_err = err; in ext4_journal_abort_handle()
191 if (is_handle_aborted(handle)) in ext4_journal_abort_handle()
197 jbd2_journal_abort_handle(handle); in ext4_journal_abort_handle()
223 handle_t *handle, struct super_block *sb, in __ext4_journal_get_write_access() argument
234 if (ext4_handle_valid(handle)) { in __ext4_journal_get_write_access()
235 err = jbd2_journal_get_write_access(handle, bh); in __ext4_journal_get_write_access()
238 handle, err); in __ext4_journal_get_write_access()
259 int __ext4_forget(const char *where, unsigned int line, handle_t *handle, in __ext4_forget() argument
275 if (!ext4_handle_valid(handle)) { in __ext4_forget()
289 err = jbd2_journal_forget(handle, bh); in __ext4_forget()
292 bh, handle, err); in __ext4_forget()
302 err = jbd2_journal_revoke(handle, blocknr, bh); in __ext4_forget()
305 bh, handle, err); in __ext4_forget()
314 handle_t *handle, struct super_block *sb, in __ext4_journal_get_create_access() argument
320 if (!ext4_handle_valid(handle)) in __ext4_journal_get_create_access()
323 err = jbd2_journal_get_create_access(handle, bh); in __ext4_journal_get_create_access()
325 ext4_journal_abort_handle(where, line, __func__, bh, handle, in __ext4_journal_get_create_access()
338 handle_t *handle, struct inode *inode, in __ext4_handle_dirty_metadata() argument
348 if (ext4_handle_valid(handle)) { in __ext4_handle_dirty_metadata()
349 err = jbd2_journal_dirty_metadata(handle, bh); in __ext4_handle_dirty_metadata()
351 if (!is_handle_aborted(handle) && WARN_ON_ONCE(err)) { in __ext4_handle_dirty_metadata()
353 handle, err); in __ext4_handle_dirty_metadata()
356 "failed: handle type %u started at " in __ext4_handle_dirty_metadata()
358 handle->h_type, in __ext4_handle_dirty_metadata()
359 handle->h_line_no, in __ext4_handle_dirty_metadata()
360 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
361 jbd2_handle_buffer_credits(handle), err); in __ext4_handle_dirty_metadata()
367 "handle type %u started at line %u, " in __ext4_handle_dirty_metadata()
369 handle->h_type, in __ext4_handle_dirty_metadata()
370 handle->h_line_no, in __ext4_handle_dirty_metadata()
371 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
372 jbd2_handle_buffer_credits(handle), in __ext4_handle_dirty_metadata()