Commit 8984d137 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext4: 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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3a229b39
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o
ext4dev-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ ext4dev-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
ext4_jbd2.o
ext4dev-$(CONFIG_EXT4DEV_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o ext4dev-$(CONFIG_EXT4DEV_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o
......
/*
* Interface between ext4 and JBD
*/
#include <linux/ext4_jbd2.h>
int __ext4_journal_get_undo_access(const char *where, handle_t *handle,
struct buffer_head *bh)
{
int err = jbd2_journal_get_undo_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_get_write_access(const char *where, handle_t *handle,
struct buffer_head *bh)
{
int err = jbd2_journal_get_write_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_forget(const char *where, handle_t *handle,
struct buffer_head *bh)
{
int err = jbd2_journal_forget(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_revoke(const char *where, handle_t *handle,
ext4_fsblk_t blocknr, struct buffer_head *bh)
{
int err = jbd2_journal_revoke(handle, blocknr, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_get_create_access(const char *where,
handle_t *handle, struct buffer_head *bh)
{
int err = jbd2_journal_get_create_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_dirty_metadata(const char *where,
handle_t *handle, struct buffer_head *bh)
{
int err = jbd2_journal_dirty_metadata(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
...@@ -114,74 +114,32 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode); ...@@ -114,74 +114,32 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode);
* been done yet. * been done yet.
*/ */
void ext4_journal_abort_handle(const char *caller, const char *err_fn, static inline void ext4_journal_release_buffer(handle_t *handle,
struct buffer_head *bh, handle_t *handle, int err); struct buffer_head *bh)
static inline int
__ext4_journal_get_undo_access(const char *where, handle_t *handle,
struct buffer_head *bh)
{ {
int err = jbd2_journal_get_undo_access(handle, bh); jbd2_journal_release_buffer(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
} }
static inline int void ext4_journal_abort_handle(const char *caller, const char *err_fn,
__ext4_journal_get_write_access(const char *where, handle_t *handle, struct buffer_head *bh, handle_t *handle, int err);
struct buffer_head *bh)
{
int err = jbd2_journal_get_write_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
static inline void int __ext4_journal_get_undo_access(const char *where, handle_t *handle,
ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh) struct buffer_head *bh);
{
jbd2_journal_release_buffer(handle, bh);
}
static inline int int __ext4_journal_get_write_access(const char *where, handle_t *handle,
__ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh) struct buffer_head *bh);
{
int err = jbd2_journal_forget(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
static inline int int __ext4_journal_forget(const char *where, handle_t *handle,
__ext4_journal_revoke(const char *where, handle_t *handle, struct buffer_head *bh);
ext4_fsblk_t blocknr, struct buffer_head *bh)
{
int err = jbd2_journal_revoke(handle, blocknr, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
static inline int int __ext4_journal_revoke(const char *where, handle_t *handle,
__ext4_journal_get_create_access(const char *where, ext4_fsblk_t blocknr, struct buffer_head *bh);
handle_t *handle, struct buffer_head *bh)
{
int err = jbd2_journal_get_create_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
static inline int int __ext4_journal_get_create_access(const char *where,
__ext4_journal_dirty_metadata(const char *where, handle_t *handle, struct buffer_head *bh);
handle_t *handle, struct buffer_head *bh)
{
int err = jbd2_journal_dirty_metadata(handle, bh);
if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err;
}
int __ext4_journal_dirty_metadata(const char *where,
handle_t *handle, struct buffer_head *bh);
#define ext4_journal_get_undo_access(handle, bh) \ #define ext4_journal_get_undo_access(handle, bh) \
__ext4_journal_get_undo_access(__FUNCTION__, (handle), (bh)) __ext4_journal_get_undo_access(__FUNCTION__, (handle), (bh))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment