blob: 785a3261a26c6a6f71c73e5609780a09962c3c1b [file] [log] [blame]
Andrew Morton3a229b32006-12-06 20:37:14 -08001/*
2 * Interface between ext3 and JBD
3 */
4
Al Viro4613ad12012-03-29 22:30:07 -04005#include "ext3.h"
Andrew Morton3a229b32006-12-06 20:37:14 -08006
7int __ext3_journal_get_undo_access(const char *where, handle_t *handle,
8 struct buffer_head *bh)
9{
10 int err = journal_get_undo_access(handle, bh);
11 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070012 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080013 return err;
14}
15
16int __ext3_journal_get_write_access(const char *where, handle_t *handle,
17 struct buffer_head *bh)
18{
19 int err = journal_get_write_access(handle, bh);
20 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070021 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080022 return err;
23}
24
25int __ext3_journal_forget(const char *where, handle_t *handle,
26 struct buffer_head *bh)
27{
28 int err = journal_forget(handle, bh);
29 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070030 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080031 return err;
32}
33
34int __ext3_journal_revoke(const char *where, handle_t *handle,
35 unsigned long blocknr, struct buffer_head *bh)
36{
37 int err = journal_revoke(handle, blocknr, bh);
38 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070039 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080040 return err;
41}
42
43int __ext3_journal_get_create_access(const char *where,
44 handle_t *handle, struct buffer_head *bh)
45{
46 int err = journal_get_create_access(handle, bh);
47 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070048 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080049 return err;
50}
51
52int __ext3_journal_dirty_metadata(const char *where,
53 handle_t *handle, struct buffer_head *bh)
54{
55 int err = journal_dirty_metadata(handle, bh);
56 if (err)
Harvey Harrisone05b6b52008-04-28 02:16:15 -070057 ext3_journal_abort_handle(where, __func__, bh, handle,err);
Andrew Morton3a229b32006-12-06 20:37:14 -080058 return err;
59}