diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-09-29 05:00:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:11 -0400 |
commit | cfe14677f286c9be5d683b88214def8f4b8a6f24 (patch) | |
tree | 038d6cc9d2a1f71a74fa753c0291038f37fb6718 /fs/reiserfs | |
parent | 068fbb315dd1e9dd3418aac39a9cfeabe39c16a6 (diff) |
[PATCH] reiserfs: ifdef ACL stuff from inode
Shrink reiserfs inode more (by 8 bytes) for ACL non-users:
-reiser_inode_cache 344 11
+reiser_inode_cache 336 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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/inode.c | 10 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 78f23f40693..7e5a2f5ebeb 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1127,8 +1127,8 @@ static void init_inode(struct inode *inode, struct path *path) | |||
1127 | REISERFS_I(inode)->i_prealloc_count = 0; | 1127 | REISERFS_I(inode)->i_prealloc_count = 0; |
1128 | REISERFS_I(inode)->i_trans_id = 0; | 1128 | REISERFS_I(inode)->i_trans_id = 0; |
1129 | REISERFS_I(inode)->i_jl = NULL; | 1129 | REISERFS_I(inode)->i_jl = NULL; |
1130 | REISERFS_I(inode)->i_acl_access = NULL; | 1130 | reiserfs_init_acl_access(inode); |
1131 | REISERFS_I(inode)->i_acl_default = NULL; | 1131 | reiserfs_init_acl_default(inode); |
1132 | reiserfs_init_xattr_rwsem(inode); | 1132 | reiserfs_init_xattr_rwsem(inode); |
1133 | 1133 | ||
1134 | if (stat_data_v1(ih)) { | 1134 | if (stat_data_v1(ih)) { |
@@ -1834,8 +1834,8 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1834 | REISERFS_I(inode)->i_attrs = | 1834 | REISERFS_I(inode)->i_attrs = |
1835 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; | 1835 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; |
1836 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); | 1836 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); |
1837 | REISERFS_I(inode)->i_acl_access = NULL; | 1837 | reiserfs_init_acl_access(inode); |
1838 | REISERFS_I(inode)->i_acl_default = NULL; | 1838 | reiserfs_init_acl_default(inode); |
1839 | reiserfs_init_xattr_rwsem(inode); | 1839 | reiserfs_init_xattr_rwsem(inode); |
1840 | 1840 | ||
1841 | if (old_format_only(sb)) | 1841 | if (old_format_only(sb)) |
@@ -1974,11 +1974,13 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1974 | * iput doesn't deadlock in reiserfs_delete_xattrs. The locking | 1974 | * iput doesn't deadlock in reiserfs_delete_xattrs. The locking |
1975 | * code really needs to be reworked, but this will take care of it | 1975 | * code really needs to be reworked, but this will take care of it |
1976 | * for now. -jeffm */ | 1976 | * for now. -jeffm */ |
1977 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | ||
1977 | if (REISERFS_I(dir)->i_acl_default && !IS_ERR(REISERFS_I(dir)->i_acl_default)) { | 1978 | if (REISERFS_I(dir)->i_acl_default && !IS_ERR(REISERFS_I(dir)->i_acl_default)) { |
1978 | reiserfs_write_unlock_xattrs(dir->i_sb); | 1979 | reiserfs_write_unlock_xattrs(dir->i_sb); |
1979 | iput(inode); | 1980 | iput(inode); |
1980 | reiserfs_write_lock_xattrs(dir->i_sb); | 1981 | reiserfs_write_lock_xattrs(dir->i_sb); |
1981 | } else | 1982 | } else |
1983 | #endif | ||
1982 | iput(inode); | 1984 | iput(inode); |
1983 | return err; | 1985 | return err; |
1984 | } | 1986 | } |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index b40d4d64d59..80fc3b32802 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -510,8 +510,10 @@ static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) | |||
510 | SLAB_CTOR_CONSTRUCTOR) { | 510 | SLAB_CTOR_CONSTRUCTOR) { |
511 | INIT_LIST_HEAD(&ei->i_prealloc_list); | 511 | INIT_LIST_HEAD(&ei->i_prealloc_list); |
512 | inode_init_once(&ei->vfs_inode); | 512 | inode_init_once(&ei->vfs_inode); |
513 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | ||
513 | ei->i_acl_access = NULL; | 514 | ei->i_acl_access = NULL; |
514 | ei->i_acl_default = NULL; | 515 | ei->i_acl_default = NULL; |
516 | #endif | ||
515 | } | 517 | } |
516 | } | 518 | } |
517 | 519 | ||
@@ -560,6 +562,7 @@ static void reiserfs_dirty_inode(struct inode *inode) | |||
560 | reiserfs_write_unlock(inode->i_sb); | 562 | reiserfs_write_unlock(inode->i_sb); |
561 | } | 563 | } |
562 | 564 | ||
565 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | ||
563 | static void reiserfs_clear_inode(struct inode *inode) | 566 | static void reiserfs_clear_inode(struct inode *inode) |
564 | { | 567 | { |
565 | struct posix_acl *acl; | 568 | struct posix_acl *acl; |
@@ -574,6 +577,9 @@ static void reiserfs_clear_inode(struct inode *inode) | |||
574 | posix_acl_release(acl); | 577 | posix_acl_release(acl); |
575 | REISERFS_I(inode)->i_acl_default = NULL; | 578 | REISERFS_I(inode)->i_acl_default = NULL; |
576 | } | 579 | } |
580 | #else | ||
581 | #define reiserfs_clear_inode NULL | ||
582 | #endif | ||
577 | 583 | ||
578 | #ifdef CONFIG_QUOTA | 584 | #ifdef CONFIG_QUOTA |
579 | static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, | 585 | static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, |