Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701941
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] 9p: constify xattr_handler structures |
| Date | 2017-08-02 11:10 +0200 |
| Message-ID | <u9XPd-7SS-27@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The xattr_handler structures are only stored in an array of const
structures. Thus the xattr_handler structures themselves can be
const.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
fs/9p/xattr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index f329eee..3d45d25 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -154,20 +154,20 @@ static int v9fs_xattr_handler_set(const struct xattr_handler *handler,
return v9fs_xattr_set(dentry, full_name, value, size, flags);
}
-static struct xattr_handler v9fs_xattr_user_handler = {
+static const struct xattr_handler v9fs_xattr_user_handler = {
.prefix = XATTR_USER_PREFIX,
.get = v9fs_xattr_handler_get,
.set = v9fs_xattr_handler_set,
};
-static struct xattr_handler v9fs_xattr_trusted_handler = {
+static const struct xattr_handler v9fs_xattr_trusted_handler = {
.prefix = XATTR_TRUSTED_PREFIX,
.get = v9fs_xattr_handler_get,
.set = v9fs_xattr_handler_set,
};
#ifdef CONFIG_9P_FS_SECURITY
-static struct xattr_handler v9fs_xattr_security_handler = {
+static const struct xattr_handler v9fs_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.get = v9fs_xattr_handler_get,
.set = v9fs_xattr_handler_set,
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] 9p: constify xattr_handler structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-02 11:10 +0200
csiph-web