From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 02/10] btrfs: constify xattr_handler Date: Thu, 13 May 2010 17:53:15 -0700 Message-ID: <20100514005408.658678377@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 S1755998Ab0ENBuW (ORCPT ); Thu, 13 May 2010 21:50:22 -0400 Content-Disposition: inline; filename=btrfs-xattr-const.patch Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Stephen Hemminger --- a/fs/btrfs/acl.c 2010-05-13 16:49:06.552512720 -0700 +++ b/fs/btrfs/acl.c 2010-05-13 16:49:33.092876752 -0700 @@ -282,14 +282,14 @@ int btrfs_acl_chmod(struct inode *inode) return ret; } -struct xattr_handler btrfs_xattr_acl_default_handler = { +const struct xattr_handler btrfs_xattr_acl_default_handler = { .prefix = POSIX_ACL_XATTR_DEFAULT, .flags = ACL_TYPE_DEFAULT, .get = btrfs_xattr_acl_get, .set = btrfs_xattr_acl_set, }; -struct xattr_handler btrfs_xattr_acl_access_handler = { +const struct xattr_handler btrfs_xattr_acl_access_handler = { .prefix = POSIX_ACL_XATTR_ACCESS, .flags = ACL_TYPE_ACCESS, .get = btrfs_xattr_acl_get, --- a/fs/btrfs/xattr.c 2010-05-13 16:49:06.662512773 -0700 +++ b/fs/btrfs/xattr.c 2010-05-13 16:49:55.582824597 -0700 @@ -282,7 +282,7 @@ err: * List of handlers for synthetic system.* attributes. All real ondisk * attributes are handled directly. */ -struct xattr_handler *btrfs_xattr_handlers[] = { +const struct xattr_handler *btrfs_xattr_handlers[] = { #ifdef CONFIG_BTRFS_FS_POSIX_ACL &btrfs_xattr_acl_access_handler, &btrfs_xattr_acl_default_handler, --- a/fs/btrfs/xattr.h 2010-05-13 16:49:06.762513075 -0700 +++ b/fs/btrfs/xattr.h 2010-05-13 16:50:47.473761894 -0700 @@ -21,9 +21,9 @@ #include -extern struct xattr_handler btrfs_xattr_acl_access_handler; -extern struct xattr_handler btrfs_xattr_acl_default_handler; -extern struct xattr_handler *btrfs_xattr_handlers[]; +extern const struct xattr_handler btrfs_xattr_acl_access_handler; +extern const struct xattr_handler btrfs_xattr_acl_default_handler; +extern const struct xattr_handler *btrfs_xattr_handlers[]; extern ssize_t __btrfs_getxattr(struct inode *inode, const char *name, void *buffer, size_t size);