diff options
author | Aristeu Rozanski <aris@redhat.com> | 2012-08-23 16:53:28 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-08-24 18:55:33 -0400 |
commit | 38f38657444d15e1a8574eae80ed3de9f501737a (patch) | |
tree | b39bf533c5acb4b3ee48b6602dea9d92c2e9f72f /include/linux/shmem_fs.h | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
xattr: extract simple_xattr code from tmpfs
Extract in-memory xattr APIs from tmpfs. Will be used by cgroup.
$ size vmlinux.o
text data bss dec hex filename
4658782 880729 5195032 10734543 a3cbcf vmlinux.o
$ size vmlinux.o
text data bss dec hex filename
4658957 880729 5195032 10734718 a3cc7e vmlinux.o
v7:
- checkpatch warnings fixed
- Implement the changes requested by Hugh Dickins:
- make simple_xattrs_init and simple_xattrs_free inline
- get rid of locking and list reinitialization in simple_xattrs_free,
they're not needed
v6:
- no changes
v5:
- no changes
v4:
- move simple_xattrs_free() to fs/xattr.c
v3:
- in kmem_xattrs_free(), reinitialize the list
- use simple_xattr_* prefix
- introduce simple_xattr_add() to prevent direct list usage
Original-patch-by: Li Zefan <lizefan@huawei.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Lennart Poettering <lpoetter@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/shmem_fs.h')
-rw-r--r-- | include/linux/shmem_fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index bef2cf00b3be..30aa0dc60d75 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/mempolicy.h> | 5 | #include <linux/mempolicy.h> |
6 | #include <linux/pagemap.h> | 6 | #include <linux/pagemap.h> |
7 | #include <linux/percpu_counter.h> | 7 | #include <linux/percpu_counter.h> |
8 | #include <linux/xattr.h> | ||
8 | 9 | ||
9 | /* inode in-kernel data */ | 10 | /* inode in-kernel data */ |
10 | 11 | ||
@@ -18,7 +19,7 @@ struct shmem_inode_info { | |||
18 | }; | 19 | }; |
19 | struct shared_policy policy; /* NUMA memory alloc policy */ | 20 | struct shared_policy policy; /* NUMA memory alloc policy */ |
20 | struct list_head swaplist; /* chain of maybes on swap */ | 21 | struct list_head swaplist; /* chain of maybes on swap */ |
21 | struct list_head xattr_list; /* list of shmem_xattr */ | 22 | struct simple_xattrs xattrs; /* list of xattrs */ |
22 | struct inode vfs_inode; | 23 | struct inode vfs_inode; |
23 | }; | 24 | }; |
24 | 25 | ||