From: Stephen Hemminger <shemminger@vyatta.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 07/10] xfs: constify xattr_handler
Date: Thu, 13 May 2010 17:53:20 -0700 [thread overview]
Message-ID: <20100514005409.067155085@vyatta.com> (raw)
In-Reply-To: 20100514005313.884038885@vyatta.com
[-- Attachment #1: xfs-xattr.patch --]
[-- Type: text/plain, Size: 3080 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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
next prev parent reply other threads:[~2010-05-14 1:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-14 0:53 [PATCH 00/10] Make xattr_handler constant patches Stephen Hemminger
2010-05-14 0:53 ` [PATCH 01/10] fs: xattr_handler table should be const Stephen Hemminger
2010-05-14 0:53 ` [PATCH 02/10] btrfs: constify xattr_handler Stephen Hemminger
2010-05-14 0:53 ` [PATCH 03/10] ext2: " Stephen Hemminger
2010-05-14 0:53 ` [PATCH 04/10] Subject ext3: constify xattr handlers Stephen Hemminger
2010-05-14 0:53 ` [PATCH 05/10] ext4: constify xattr_handler Stephen Hemminger
2010-05-14 0:53 ` [PATCH 06/10] reiserfs: " Stephen Hemminger
2010-05-14 0:53 ` Stephen Hemminger [this message]
2010-05-14 0:53 ` [PATCH 08/10] jffs2: " Stephen Hemminger
2010-05-14 0:53 ` [PATCH 09/10] ocfs: " Stephen Hemminger
2010-05-14 0:53 ` [PATCH 10/10] gfs: " Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100514005409.067155085@vyatta.com \
--to=shemminger@vyatta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.