Commit 068fbb31 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

[PATCH] reiserfs: ifdef xattr_sem

Shrink reiserfs inode by 12 bytes for xattr non-users (me).

	-reiser_inode_cache     356     11
	+reiser_inode_cache     344     11
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e6cab99b
...@@ -1129,7 +1129,7 @@ static void init_inode(struct inode *inode, struct path *path) ...@@ -1129,7 +1129,7 @@ static void init_inode(struct inode *inode, struct path *path)
REISERFS_I(inode)->i_jl = NULL; REISERFS_I(inode)->i_jl = NULL;
REISERFS_I(inode)->i_acl_access = NULL; REISERFS_I(inode)->i_acl_access = NULL;
REISERFS_I(inode)->i_acl_default = NULL; REISERFS_I(inode)->i_acl_default = NULL;
init_rwsem(&REISERFS_I(inode)->xattr_sem); reiserfs_init_xattr_rwsem(inode);
if (stat_data_v1(ih)) { if (stat_data_v1(ih)) {
struct stat_data_v1 *sd = struct stat_data_v1 *sd =
...@@ -1836,7 +1836,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, ...@@ -1836,7 +1836,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode);
REISERFS_I(inode)->i_acl_access = NULL; REISERFS_I(inode)->i_acl_access = NULL;
REISERFS_I(inode)->i_acl_default = NULL; REISERFS_I(inode)->i_acl_default = NULL;
init_rwsem(&REISERFS_I(inode)->xattr_sem); reiserfs_init_xattr_rwsem(inode);
if (old_format_only(sb)) if (old_format_only(sb))
make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET, make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET,
......
...@@ -55,7 +55,9 @@ struct reiserfs_inode_info { ...@@ -55,7 +55,9 @@ struct reiserfs_inode_info {
struct posix_acl *i_acl_access; struct posix_acl *i_acl_access;
struct posix_acl *i_acl_default; struct posix_acl *i_acl_default;
#ifdef CONFIG_REISERFS_FS_XATTR
struct rw_semaphore xattr_sem; struct rw_semaphore xattr_sem;
#endif
struct inode vfs_inode; struct inode vfs_inode;
}; };
......
...@@ -97,6 +97,11 @@ static inline void reiserfs_mark_inode_private(struct inode *inode) ...@@ -97,6 +97,11 @@ static inline void reiserfs_mark_inode_private(struct inode *inode)
inode->i_flags |= S_PRIVATE; inode->i_flags |= S_PRIVATE;
} }
static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
{
init_rwsem(&REISERFS_I(inode)->xattr_sem);
}
#else #else
#define is_reiserfs_priv_object(inode) 0 #define is_reiserfs_priv_object(inode) 0
...@@ -129,6 +134,9 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) ...@@ -129,6 +134,9 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */
return 0; return 0;
}; };
static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
{
}
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
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