diff options
author | Andrew Morton <akpm@osdl.org> | 2006-12-06 23:37:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:35 -0500 |
commit | 3a229b39eb8497ae5f8077f81f7c8c3e1aacd624 (patch) | |
tree | cfec8501e4f3fa57c61897ce11e5247ca3842876 /include/linux/ext3_jbd.h | |
parent | 072330584404392dae44cd0793ac9b316cff045b (diff) |
[PATCH] ext3: uninline large functions
Saves nearly 4kbytes on x86.
Cc: Arnaldo Carvalho de Melo <acme@mandriva.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ext3_jbd.h')
-rw-r--r-- | include/linux/ext3_jbd.h | 76 |
1 files changed, 17 insertions, 59 deletions
diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h index ce0e6109aff0..8c43b13a02fe 100644 --- a/include/linux/ext3_jbd.h +++ b/include/linux/ext3_jbd.h | |||
@@ -109,74 +109,32 @@ int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode); | |||
109 | * been done yet. | 109 | * been done yet. |
110 | */ | 110 | */ |
111 | 111 | ||
112 | void ext3_journal_abort_handle(const char *caller, const char *err_fn, | 112 | static inline void ext3_journal_release_buffer(handle_t *handle, |
113 | struct buffer_head *bh, handle_t *handle, int err); | 113 | struct buffer_head *bh) |
114 | |||
115 | static inline int | ||
116 | __ext3_journal_get_undo_access(const char *where, handle_t *handle, | ||
117 | struct buffer_head *bh) | ||
118 | { | 114 | { |
119 | int err = journal_get_undo_access(handle, bh); | 115 | journal_release_buffer(handle, bh); |
120 | if (err) | ||
121 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
122 | return err; | ||
123 | } | 116 | } |
124 | 117 | ||
125 | static inline int | 118 | void ext3_journal_abort_handle(const char *caller, const char *err_fn, |
126 | __ext3_journal_get_write_access(const char *where, handle_t *handle, | 119 | struct buffer_head *bh, handle_t *handle, int err); |
127 | struct buffer_head *bh) | ||
128 | { | ||
129 | int err = journal_get_write_access(handle, bh); | ||
130 | if (err) | ||
131 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
132 | return err; | ||
133 | } | ||
134 | 120 | ||
135 | static inline void | 121 | int __ext3_journal_get_undo_access(const char *where, handle_t *handle, |
136 | ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh) | 122 | struct buffer_head *bh); |
137 | { | ||
138 | journal_release_buffer(handle, bh); | ||
139 | } | ||
140 | 123 | ||
141 | static inline int | 124 | int __ext3_journal_get_write_access(const char *where, handle_t *handle, |
142 | __ext3_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh) | 125 | struct buffer_head *bh); |
143 | { | ||
144 | int err = journal_forget(handle, bh); | ||
145 | if (err) | ||
146 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
147 | return err; | ||
148 | } | ||
149 | 126 | ||
150 | static inline int | 127 | int __ext3_journal_forget(const char *where, handle_t *handle, |
151 | __ext3_journal_revoke(const char *where, handle_t *handle, | 128 | struct buffer_head *bh); |
152 | unsigned long blocknr, struct buffer_head *bh) | ||
153 | { | ||
154 | int err = journal_revoke(handle, blocknr, bh); | ||
155 | if (err) | ||
156 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
157 | return err; | ||
158 | } | ||
159 | 129 | ||
160 | static inline int | 130 | int __ext3_journal_revoke(const char *where, handle_t *handle, |
161 | __ext3_journal_get_create_access(const char *where, | 131 | unsigned long blocknr, struct buffer_head *bh); |
162 | handle_t *handle, struct buffer_head *bh) | ||
163 | { | ||
164 | int err = journal_get_create_access(handle, bh); | ||
165 | if (err) | ||
166 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
167 | return err; | ||
168 | } | ||
169 | 132 | ||
170 | static inline int | 133 | int __ext3_journal_get_create_access(const char *where, |
171 | __ext3_journal_dirty_metadata(const char *where, | 134 | handle_t *handle, struct buffer_head *bh); |
172 | handle_t *handle, struct buffer_head *bh) | ||
173 | { | ||
174 | int err = journal_dirty_metadata(handle, bh); | ||
175 | if (err) | ||
176 | ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); | ||
177 | return err; | ||
178 | } | ||
179 | 135 | ||
136 | int __ext3_journal_dirty_metadata(const char *where, | ||
137 | handle_t *handle, struct buffer_head *bh); | ||
180 | 138 | ||
181 | #define ext3_journal_get_undo_access(handle, bh) \ | 139 | #define ext3_journal_get_undo_access(handle, bh) \ |
182 | __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) | 140 | __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) |