aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext3_jbd.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-12-06 23:37:14 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:35 -0500
commit3a229b39eb8497ae5f8077f81f7c8c3e1aacd624 (patch)
treecfec8501e4f3fa57c61897ce11e5247ca3842876 /include/linux/ext3_jbd.h
parent072330584404392dae44cd0793ac9b316cff045b (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.h76
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
112void ext3_journal_abort_handle(const char *caller, const char *err_fn, 112static 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
115static 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
125static inline int 118void 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
135static inline void 121int __ext3_journal_get_undo_access(const char *where, handle_t *handle,
136ext3_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
141static inline int 124int __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
150static inline int 127int __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
160static inline int 130int __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
170static inline int 133int __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
136int __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))