1 #include "ext2fs.h"
2 #include "linux/ext4.h"
3 
4 static handle_t no_journal;
5 
6 handle_t *__ext4_journal_start_sb(void *icb, struct super_block *sb, unsigned int line,
7 				  int type, int blocks, int rsv_blocks)
8 {
9 	return &no_journal;
10 }
11 
12 int __ext4_journal_stop(const char *where, unsigned int line, void *icb, handle_t *handle)
13 {
14 	return 0;
15 }
16 
17 void ext4_journal_abort_handle(const char *caller, unsigned int line,
18 			       const char *err_fn, struct buffer_head *bh,
19 			       handle_t *handle, int err)
20 {
21 }
22 
23 int __ext4_journal_get_write_access(const char *where, unsigned int line,
24 				    void *icb, handle_t *handle, struct buffer_head *bh)
25 {
26 	int err = 0;
27 	return err;
28 }
29 
30 /*
31  * The ext4 forget function must perform a revoke if we are freeing data
32  * which has been journaled.  Metadata (eg. indirect blocks) must be
33  * revoked in all cases.
34  *
35  * "bh" may be NULL: a metadata block may have been freed from memory
36  * but there may still be a record of it in the journal, and that record
37  * still needs to be revoked.
38  *
39  * If the handle isn't valid we're not journaling, but we still need to
40  * call into ext4_journal_revoke() to put the buffer head.
41  */
42 int __ext4_forget(const char *where, unsigned int line, void *icb, handle_t *handle,
43 		  int is_metadata, struct inode *inode,
44 		  struct buffer_head *bh, ext4_fsblk_t blocknr)
45 {
46 	int err = 0;
47 	return err;
48 }
49 
50 int __ext4_journal_get_create_access(const char *where, unsigned int line,
51 				void *icb, handle_t *handle, struct buffer_head *bh)
52 {
53 	int err = 0;
54 	return err;
55 }
56 
57 int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
58 				 void *icb, handle_t *handle, struct inode *inode,
59 				 struct buffer_head *bh)
60 {
61 	int err = 0;
62 
63 	extents_mark_buffer_dirty(bh);
64 	return err;
65 }
66 
67 int __ext4_handle_dirty_super(const char *where, unsigned int line,
68 			      handle_t *handle, struct super_block *sb)
69 {
70     return 0;
71 }
72