From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 07/10] xfs: constify xattr_handler Date: Thu, 13 May 2010 17:53:20 -0700 Message-ID: <20100514005409.067155085@vyatta.com> References: <20100514005313.884038885@vyatta.com> Cc: linux-fsdevel@vger.kernel.org To: Alexander Viro Return-path: Received: from suva.vyatta.com ([76.74.103.44]:42955 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755621Ab0ENByZ (ORCPT ); Thu, 13 May 2010 21:54:25 -0400 Content-Disposition: inline; filename=xfs-xattr.patch Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Stephen Hemminger --- a/fs/xfs/linux-2.6/xfs_acl.c 2010-05-13 17:20:23.783786528 -0700 +++ b/fs/xfs/linux-2.6/xfs_acl.c 2010-05-13 17:21:51.199172670 -0700 @@ -440,14 +440,14 @@ xfs_xattr_acl_set(struct dentry *dentry, return error; } -struct xattr_handler xfs_xattr_acl_access_handler = { +const struct xattr_handler xfs_xattr_acl_access_handler = { .prefix = POSIX_ACL_XATTR_ACCESS, .flags = ACL_TYPE_ACCESS, .get = xfs_xattr_acl_get, .set = xfs_xattr_acl_set, }; -struct xattr_handler xfs_xattr_acl_default_handler = { +const struct xattr_handler xfs_xattr_acl_default_handler = { .prefix = POSIX_ACL_XATTR_DEFAULT, .flags = ACL_TYPE_DEFAULT, .get = xfs_xattr_acl_get, --- a/fs/xfs/linux-2.6/xfs_super.h 2010-05-13 17:20:23.813789995 -0700 +++ b/fs/xfs/linux-2.6/xfs_super.h 2010-05-13 17:22:26.552530771 -0700 @@ -85,7 +85,7 @@ extern __uint64_t xfs_max_file_offset(un extern void xfs_blkdev_issue_flush(struct xfs_buftarg *); extern const struct export_operations xfs_export_operations; -extern struct xattr_handler *xfs_xattr_handlers[]; +extern const struct xattr_handler *xfs_xattr_handlers[]; extern const struct quotactl_ops xfs_quotactl_operations; #define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info)) --- a/fs/xfs/linux-2.6/xfs_xattr.c 2010-05-13 17:20:23.833761878 -0700 +++ b/fs/xfs/linux-2.6/xfs_xattr.c 2010-05-13 17:22:07.034704050 -0700 @@ -72,28 +72,28 @@ xfs_xattr_set(struct dentry *dentry, con (void *)value, size, xflags); } -static struct xattr_handler xfs_xattr_user_handler = { +static const struct xattr_handler xfs_xattr_user_handler = { .prefix = XATTR_USER_PREFIX, .flags = 0, /* no flags implies user namespace */ .get = xfs_xattr_get, .set = xfs_xattr_set, }; -static struct xattr_handler xfs_xattr_trusted_handler = { +static const struct xattr_handler xfs_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .flags = ATTR_ROOT, .get = xfs_xattr_get, .set = xfs_xattr_set, }; -static struct xattr_handler xfs_xattr_security_handler = { +static const struct xattr_handler xfs_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .flags = ATTR_SECURE, .get = xfs_xattr_get, .set = xfs_xattr_set, }; -struct xattr_handler *xfs_xattr_handlers[] = { +const struct xattr_handler *xfs_xattr_handlers[] = { &xfs_xattr_user_handler, &xfs_xattr_trusted_handler, &xfs_xattr_security_handler, --- a/fs/xfs/xfs_acl.h 2010-05-13 17:20:23.843783965 -0700 +++ b/fs/xfs/xfs_acl.h 2010-05-13 17:21:42.583156613 -0700 @@ -49,8 +49,8 @@ extern int xfs_acl_chmod(struct inode *i extern int posix_acl_access_exists(struct inode *inode); extern int posix_acl_default_exists(struct inode *inode); -extern struct xattr_handler xfs_xattr_acl_access_handler; -extern struct xattr_handler xfs_xattr_acl_default_handler; +extern const struct xattr_handler xfs_xattr_acl_access_handler; +extern const struct xattr_handler xfs_xattr_acl_default_handler; #else # define xfs_check_acl NULL # define xfs_get_acl(inode, type) NULL