Documentation/Configure.help | 66 ++ arch/alpha/defconfig | 7 arch/alpha/kernel/entry.S | 12 arch/arm/defconfig | 7 arch/arm/kernel/calls.S | 24 arch/i386/defconfig | 7 arch/ia64/defconfig | 7 arch/ia64/kernel/entry.S | 24 arch/m68k/defconfig | 7 arch/mips/defconfig | 7 arch/mips64/defconfig | 7 arch/ppc/defconfig | 14 arch/ppc64/kernel/misc.S | 2 arch/s390/defconfig | 7 arch/s390/kernel/entry.S | 24 arch/s390x/defconfig | 7 arch/s390x/kernel/entry.S | 24 arch/s390x/kernel/wrapper32.S | 92 +++ arch/sparc/defconfig | 7 arch/sparc/kernel/systbls.S | 10 arch/sparc64/defconfig | 7 arch/sparc64/kernel/systbls.S | 20 fs/Config.in | 14 fs/Makefile | 3 fs/ext2/Makefile | 4 fs/ext2/file.c | 5 fs/ext2/ialloc.c | 2 fs/ext2/inode.c | 34 - fs/ext2/namei.c | 14 fs/ext2/super.c | 29 fs/ext2/symlink.c | 14 fs/ext2/xattr.c | 1212 +++++++++++++++++++++++++++++++++++++++++ fs/ext2/xattr_user.c | 103 +++ fs/ext3/Makefile | 10 fs/ext3/file.c | 5 fs/ext3/ialloc.c | 2 fs/ext3/inode.c | 35 - fs/ext3/namei.c | 21 fs/ext3/super.c | 36 + fs/ext3/symlink.c | 14 fs/ext3/xattr.c | 1225 ++++++++++++++++++++++++++++++++++++++++++ fs/ext3/xattr_user.c | 111 +++ fs/jfs/jfs_xattr.h | 6 fs/jfs/xattr.c | 6 fs/mbcache.c | 648 ++++++++++++++++++++++ include/asm-arm/unistd.h | 2 include/asm-ia64/unistd.h | 13 include/asm-ppc64/unistd.h | 2 include/asm-s390/unistd.h | 15 include/asm-s390x/unistd.h | 15 include/asm-sparc/unistd.h | 24 include/asm-sparc64/unistd.h | 24 include/linux/cache_def.h | 15 include/linux/errno.h | 4 include/linux/ext2_fs.h | 31 - include/linux/ext2_xattr.h | 157 +++++ include/linux/ext3_fs.h | 31 - include/linux/ext3_jbd.h | 8 include/linux/ext3_xattr.h | 157 +++++ include/linux/fs.h | 2 include/linux/mbcache.h | 69 ++ kernel/ksyms.c | 4 mm/vmscan.c | 35 + fs/ext3/ext3-exports.c | 14 + 64 files changed, 4355 insertions(+), 195 deletions(-) Index: linux-2.4.21-241/Documentation/Configure.help =================================================================== --- linux-2.4.21-241.orig/Documentation/Configure.help 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/Documentation/Configure.help 2004-10-04 02:19:55.000000000 -0400 @@ -16421,6 +16421,39 @@ If unsure, say N. +Ext3 extended attributes +CONFIG_EXT3_FS_XATTR + Extended attributes are name:value pairs associated with inodes by + the kernel or by users (see the attr(5) manual page, or visit + for details). + + If unsure, say N. + +Ext3 extended attribute block sharing +CONFIG_EXT3_FS_XATTR_SHARING + This options enables code for sharing identical extended attribute + blocks among multiple inodes. + + Usually, say Y. + +Ext3 extended user attributes +CONFIG_EXT3_FS_XATTR_USER + This option enables extended user attributes on ext3. Processes can + associate extended user attributes with inodes to store additional + information such as the character encoding of files, etc. (see the + attr(5) manual page, or visit for details). + + If unsure, say N. + +Ext3 trusted extended attributes +CONFIG_EXT3_FS_XATTR_TRUSTED + This option enables extended attributes on ext3 that are accessible + (and visible) only to users capable of CAP_SYS_ADMIN. Usually this + is only the super user. Trusted extended attributes are meant for + implementing system/security services. + + If unsure, say N. + Journal Block Device support (JBD for ext3) (EXPERIMENTAL) CONFIG_JBD This is a generic journalling layer for block devices. It is Index: linux-2.4.21-241/fs/ext3/Makefile =================================================================== --- linux-2.4.21-241.orig/fs/ext3/Makefile 2004-10-04 02:19:51.000000000 -0400 +++ linux-2.4.21-241/fs/ext3/Makefile 2004-10-04 02:19:55.000000000 -0400 @@ -9,10 +9,10 @@ O_TARGET := ext3.o -export-objs := super.o inode.o +export-objs := ext3-exports.o obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ - ioctl.o namei.o super.o symlink.o hash.o + ioctl.o namei.o super.o symlink.o hash.o ext3-exports.o obj-m := $(O_TARGET) export-objs += xattr.o Index: linux-2.4.21-241/fs/ext3/super.c =================================================================== --- linux-2.4.21-241.orig/fs/ext3/super.c 2004-10-04 02:19:51.000000000 -0400 +++ linux-2.4.21-241/fs/ext3/super.c 2004-10-04 02:19:55.000000000 -0400 @@ -1914,9 +1914,6 @@ unregister_filesystem(&ext3_fs_type); } -EXPORT_SYMBOL(ext3_force_commit); -EXPORT_SYMBOL(ext3_bread); - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); MODULE_LICENSE("GPL"); Index: linux-2.4.21-241/fs/ext3/ext3-exports.c =================================================================== --- linux-2.4.21-241.orig/fs/ext3/ext3-exports.c 1969-12-31 19:00:00.000000000 -0500 +++ linux-2.4.21-241/fs/ext3/ext3-exports.c 2004-10-04 02:19:55.000000000 -0400 @@ -0,0 +1,14 @@ +#include +#include +#include +#include +#include + +EXPORT_SYMBOL(ext3_force_commit); +EXPORT_SYMBOL(ext3_bread); +EXPORT_SYMBOL(ext3_journal_abort_handle); +EXPORT_SYMBOL(ext3_xattr_register); +EXPORT_SYMBOL(ext3_xattr_unregister); +EXPORT_SYMBOL(ext3_xattr_get); +EXPORT_SYMBOL(ext3_xattr_list); +EXPORT_SYMBOL(ext3_xattr_set); Index: linux-2.4.21-241/fs/ext3/xattr_trusted.c =================================================================== --- linux-2.4.21-241.orig/fs/ext3/xattr_trusted.c 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/fs/ext3/xattr_trusted.c 2004-10-04 02:19:55.000000000 -0400 @@ -50,7 +50,7 @@ return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; - return ext3_xattr_set(inode, EXT3_XATTR_INDEX_TRUSTED, name, + return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_TRUSTED, name, value, size, flags); } Index: linux-2.4.21-241/fs/ext3/xattr.c =================================================================== --- linux-2.4.21-241.orig/fs/ext3/xattr.c 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/fs/ext3/xattr.c 2004-10-04 02:23:13.000000000 -0400 @@ -785,7 +785,7 @@ * don't need to change the reference count. */ new_bh = old_bh; get_bh(new_bh); - ext3_xattr_cache_insert(new_bh); + (void)ext3_xattr_cache_insert(new_bh); } else { /* We need to allocate a new block */ int goal = le32_to_cpu(EXT3_SB(inode->i_sb)->s_es-> @@ -814,7 +814,7 @@ memcpy(new_bh->b_data, header, new_bh->b_size); mark_buffer_uptodate(new_bh, 1); unlock_buffer(new_bh); - ext3_xattr_cache_insert(new_bh); + (void)ext3_xattr_cache_insert(new_bh); ext3_xattr_update_super_block(handle, sb); } @@ -870,7 +870,7 @@ } /* - * ext3_xattr_set() + * ext3_xattr_set_trans() * * Like ext3_xattr_set_handle, but start from an inode. This extended * attribute modification is a filesystem transaction by itself. @@ -878,7 +878,7 @@ * Returns 0, or a negative error number on failure. */ int -ext3_xattr_set(struct inode *inode, int name_index, const char *name, +ext3_xattr_set_trans(struct inode *inode, int name_index, const char *name, const void *value, size_t value_len, int flags) { handle_t *handle; @@ -900,6 +900,20 @@ return error; } +int +ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index, + const char *name, const void *value, size_t value_len, + int flags) +{ + int error; + + lock_kernel(); + error = ext3_xattr_set_handle(handle, inode, name_index, name, + value, value_len, flags); + unlock_kernel(); + return error; +} + /* * ext3_xattr_delete_inode() * Index: linux-2.4.21-241/fs/ext3/xattr_user.c =================================================================== --- linux-2.4.21-241.orig/fs/ext3/xattr_user.c 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/fs/ext3/xattr_user.c 2004-10-04 02:19:55.000000000 -0400 @@ -70,7 +70,7 @@ if (error) return error; - return ext3_xattr_set(inode, EXT3_XATTR_INDEX_USER, name, + return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_USER, name, value, size, flags); } Index: linux-2.4.21-241/include/linux/errno.h =================================================================== --- linux-2.4.21-241.orig/include/linux/errno.h 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/include/linux/errno.h 2004-10-04 02:19:55.000000000 -0400 @@ -26,4 +26,8 @@ #endif +/* Defined for extended attributes */ +#define ENOATTR ENODATA /* No such attribute */ +#define ENOTSUP EOPNOTSUPP /* Operation not supported */ + #endif Index: linux-2.4.21-241/include/linux/ext3_xattr.h =================================================================== --- linux-2.4.21-241.orig/include/linux/ext3_xattr.h 2004-10-03 17:37:47.000000000 -0400 +++ linux-2.4.21-241/include/linux/ext3_xattr.h 2004-10-04 02:19:55.000000000 -0400 @@ -80,8 +80,10 @@ extern int ext3_xattr_list(struct inode *, char *, size_t); extern int ext3_xattr_set_handle(handle_t *handle, struct inode *, int, const char *, const void *, size_t, int); -extern int ext3_xattr_set(struct inode *, int, const char *, const void *, +extern int ext3_xattr_set_trans(struct inode *, int, const char *, const void *, size_t, int); +extern int ext3_xattr_set(handle_t *, struct inode *, int, const char *, + const void *, size_t, int); extern void ext3_xattr_delete_inode(handle_t *, struct inode *); extern void ext3_xattr_put_super(struct super_block *);