xattr: extract simple_xattr code from tmpfs
authorAristeu Rozanski <[email protected]>
Thu, 23 Aug 2012 20:53:28 +0000 (16:53 -0400)
committerTejun Heo <[email protected]>
Fri, 24 Aug 2012 22:55:33 +0000 (15:55 -0700)
commit38f38657444d15e1a8574eae80ed3de9f501737a
treeb39bf533c5acb4b3ee48b6602dea9d92c2e9f72f
parentfea7a08acb13524b47711625eebea40a0ede69a0
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 <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Lennart Poettering <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Signed-off-by: Li Zefan <[email protected]>
Signed-off-by: Aristeu Rozanski <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
fs/xattr.c
include/linux/shmem_fs.h
include/linux/xattr.h
mm/shmem.c