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 (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 buffer_head *bh) in __ext4_journal_get_write_access() argument
230 if (ext4_handle_valid(handle)) { in __ext4_journal_get_write_access()
231 err = jbd2_journal_get_write_access(handle, bh); in __ext4_journal_get_write_access()
234 handle, err); in __ext4_journal_get_write_access()
248 * If the handle isn't valid we're not journaling, but we still need to
251 int __ext4_forget(const char *where, unsigned int line, handle_t *handle, in __ext4_forget() argument
268 if (!ext4_handle_valid(handle)) { in __ext4_forget()
282 err = jbd2_journal_forget(handle, bh); in __ext4_forget()
285 bh, handle, err); in __ext4_forget()
295 err = jbd2_journal_revoke(handle, blocknr, bh); in __ext4_forget()
298 bh, handle, err); in __ext4_forget()
307 handle_t *handle, struct buffer_head *bh) in __ext4_journal_get_create_access() argument
311 if (ext4_handle_valid(handle)) { in __ext4_journal_get_create_access()
312 err = jbd2_journal_get_create_access(handle, bh); in __ext4_journal_get_create_access()
315 bh, handle, err); in __ext4_journal_get_create_access()
321 handle_t *handle, struct inode *inode, in __ext4_handle_dirty_metadata() argument
330 if (ext4_handle_valid(handle)) { in __ext4_handle_dirty_metadata()
331 err = jbd2_journal_dirty_metadata(handle, bh); in __ext4_handle_dirty_metadata()
333 if (!is_handle_aborted(handle) && WARN_ON_ONCE(err)) { in __ext4_handle_dirty_metadata()
335 handle, err); in __ext4_handle_dirty_metadata()
338 "failed: handle type %u started at " in __ext4_handle_dirty_metadata()
340 handle->h_type, in __ext4_handle_dirty_metadata()
341 handle->h_line_no, in __ext4_handle_dirty_metadata()
342 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
343 jbd2_handle_buffer_credits(handle), err); in __ext4_handle_dirty_metadata()
349 "handle type %u started at line %u, " in __ext4_handle_dirty_metadata()
351 handle->h_type, in __ext4_handle_dirty_metadata()
352 handle->h_line_no, in __ext4_handle_dirty_metadata()
353 handle->h_requested_credits, in __ext4_handle_dirty_metadata()
354 jbd2_handle_buffer_credits(handle), in __ext4_handle_dirty_metadata()
377 handle_t *handle, struct super_block *sb) in __ext4_handle_dirty_super() argument
383 if (ext4_handle_valid(handle)) { in __ext4_handle_dirty_super()
384 err = jbd2_journal_dirty_metadata(handle, bh); in __ext4_handle_dirty_super()
387 bh, handle, err); in __ext4_handle_dirty_super()