aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2016-09-29 11:48:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-10-06 22:17:38 -0400
commit6966f842c044bc602ecc06712ee5891328fde10e (patch)
tree2bab55f9d22c9139f030d87389fd0f076cbdbfb2
parent5d18cbf16cfb0ad65368fe2ead19237305f4b822 (diff)
jffs2: Remove jffs2_{get,set,remove}xattr macros
When CONFIG_JFFS2_FS_XATTR is off, jffs2_xattr_handlers is defined as NULL. With sb->s_xattr == NULL, the generic_{get,set,remove}xattr functions produce the same result as setting the {get,set,remove}xattr inode operations to NULL, so there is no need for these macros. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/jffs2/dir.c6
-rw-r--r--fs/jffs2/file.c6
-rw-r--r--fs/jffs2/symlink.c6
-rw-r--r--fs/jffs2/xattr.h6
4 files changed, 9 insertions, 15 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 30eb33ff8189..8aa2f8936c3a 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -61,10 +61,10 @@ const struct inode_operations jffs2_dir_inode_operations =
61 .get_acl = jffs2_get_acl, 61 .get_acl = jffs2_get_acl,
62 .set_acl = jffs2_set_acl, 62 .set_acl = jffs2_set_acl,
63 .setattr = jffs2_setattr, 63 .setattr = jffs2_setattr,
64 .setxattr = jffs2_setxattr, 64 .setxattr = generic_setxattr,
65 .getxattr = jffs2_getxattr, 65 .getxattr = generic_getxattr,
66 .listxattr = jffs2_listxattr, 66 .listxattr = jffs2_listxattr,
67 .removexattr = jffs2_removexattr 67 .removexattr = generic_removexattr
68}; 68};
69 69
70/***********************************************************************/ 70/***********************************************************************/
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 0e62dec3effc..fdf9e1cb2e48 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -66,10 +66,10 @@ const struct inode_operations jffs2_file_inode_operations =
66 .get_acl = jffs2_get_acl, 66 .get_acl = jffs2_get_acl,
67 .set_acl = jffs2_set_acl, 67 .set_acl = jffs2_set_acl,
68 .setattr = jffs2_setattr, 68 .setattr = jffs2_setattr,
69 .setxattr = jffs2_setxattr, 69 .setxattr = generic_setxattr,
70 .getxattr = jffs2_getxattr, 70 .getxattr = generic_getxattr,
71 .listxattr = jffs2_listxattr, 71 .listxattr = jffs2_listxattr,
72 .removexattr = jffs2_removexattr 72 .removexattr = generic_removexattr
73}; 73};
74 74
75const struct address_space_operations jffs2_file_address_operations = 75const struct address_space_operations jffs2_file_address_operations =
diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c
index 2cabd649d4fb..afe2d75ae395 100644
--- a/fs/jffs2/symlink.c
+++ b/fs/jffs2/symlink.c
@@ -16,8 +16,8 @@ const struct inode_operations jffs2_symlink_inode_operations =
16 .readlink = generic_readlink, 16 .readlink = generic_readlink,
17 .get_link = simple_get_link, 17 .get_link = simple_get_link,
18 .setattr = jffs2_setattr, 18 .setattr = jffs2_setattr,
19 .setxattr = jffs2_setxattr, 19 .setxattr = generic_setxattr,
20 .getxattr = jffs2_getxattr, 20 .getxattr = generic_getxattr,
21 .listxattr = jffs2_listxattr, 21 .listxattr = jffs2_listxattr,
22 .removexattr = jffs2_removexattr 22 .removexattr = generic_removexattr
23}; 23};
diff --git a/fs/jffs2/xattr.h b/fs/jffs2/xattr.h
index 467ff376ee26..720007b2fd65 100644
--- a/fs/jffs2/xattr.h
+++ b/fs/jffs2/xattr.h
@@ -99,9 +99,6 @@ extern const struct xattr_handler jffs2_user_xattr_handler;
99extern const struct xattr_handler jffs2_trusted_xattr_handler; 99extern const struct xattr_handler jffs2_trusted_xattr_handler;
100 100
101extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); 101extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t);
102#define jffs2_getxattr generic_getxattr
103#define jffs2_setxattr generic_setxattr
104#define jffs2_removexattr generic_removexattr
105 102
106#else 103#else
107 104
@@ -116,9 +113,6 @@ extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t);
116 113
117#define jffs2_xattr_handlers NULL 114#define jffs2_xattr_handlers NULL
118#define jffs2_listxattr NULL 115#define jffs2_listxattr NULL
119#define jffs2_getxattr NULL
120#define jffs2_setxattr NULL
121#define jffs2_removexattr NULL
122 116
123#endif /* CONFIG_JFFS2_FS_XATTR */ 117#endif /* CONFIG_JFFS2_FS_XATTR */
124 118