Commit 068fbb315dd1e9dd3418aac39a9cfeabe39c16a6

Authored by Alexey Dobriyan
Committed by Linus Torvalds
1 parent e6cab99bb4

[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: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 3 changed files with 12 additions and 2 deletions Side-by-side Diff

... ... @@ -1129,7 +1129,7 @@
1129 1129 REISERFS_I(inode)->i_jl = NULL;
1130 1130 REISERFS_I(inode)->i_acl_access = NULL;
1131 1131 REISERFS_I(inode)->i_acl_default = NULL;
1132   - init_rwsem(&REISERFS_I(inode)->xattr_sem);
  1132 + reiserfs_init_xattr_rwsem(inode);
1133 1133  
1134 1134 if (stat_data_v1(ih)) {
1135 1135 struct stat_data_v1 *sd =
... ... @@ -1836,7 +1836,7 @@
1836 1836 sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode);
1837 1837 REISERFS_I(inode)->i_acl_access = NULL;
1838 1838 REISERFS_I(inode)->i_acl_default = NULL;
1839   - init_rwsem(&REISERFS_I(inode)->xattr_sem);
  1839 + reiserfs_init_xattr_rwsem(inode);
1840 1840  
1841 1841 if (old_format_only(sb))
1842 1842 make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET,
include/linux/reiserfs_fs_i.h
... ... @@ -55,7 +55,9 @@
55 55  
56 56 struct posix_acl *i_acl_access;
57 57 struct posix_acl *i_acl_default;
  58 +#ifdef CONFIG_REISERFS_FS_XATTR
58 59 struct rw_semaphore xattr_sem;
  60 +#endif
59 61 struct inode vfs_inode;
60 62 };
61 63  
include/linux/reiserfs_xattr.h
... ... @@ -97,6 +97,11 @@
97 97 inode->i_flags |= S_PRIVATE;
98 98 }
99 99  
  100 +static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
  101 +{
  102 + init_rwsem(&REISERFS_I(inode)->xattr_sem);
  103 +}
  104 +
100 105 #else
101 106  
102 107 #define is_reiserfs_priv_object(inode) 0
... ... @@ -129,6 +134,9 @@
129 134 sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */
130 135 return 0;
131 136 };
  137 +static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
  138 +{
  139 +}
132 140 #endif
133 141  
134 142 #endif /* __KERNEL__ */