diff options
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r-- | fs/ocfs2/xattr.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index e9164f09841b..5823f985a662 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -544,8 +544,7 @@ static inline const char *ocfs2_xattr_prefix(int name_index) | |||
544 | 544 | ||
545 | if (name_index > 0 && name_index < OCFS2_XATTR_MAX) | 545 | if (name_index > 0 && name_index < OCFS2_XATTR_MAX) |
546 | handler = ocfs2_xattr_handler_map[name_index]; | 546 | handler = ocfs2_xattr_handler_map[name_index]; |
547 | 547 | return handler ? xattr_prefix(handler) : NULL; | |
548 | return handler ? handler->prefix : NULL; | ||
549 | } | 548 | } |
550 | 549 | ||
551 | static u32 ocfs2_xattr_name_hash(struct inode *inode, | 550 | static u32 ocfs2_xattr_name_hash(struct inode *inode, |
@@ -7249,8 +7248,6 @@ static int ocfs2_xattr_security_get(const struct xattr_handler *handler, | |||
7249 | struct dentry *dentry, const char *name, | 7248 | struct dentry *dentry, const char *name, |
7250 | void *buffer, size_t size) | 7249 | void *buffer, size_t size) |
7251 | { | 7250 | { |
7252 | if (strcmp(name, "") == 0) | ||
7253 | return -EINVAL; | ||
7254 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_SECURITY, | 7251 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_SECURITY, |
7255 | name, buffer, size); | 7252 | name, buffer, size); |
7256 | } | 7253 | } |
@@ -7259,9 +7256,6 @@ static int ocfs2_xattr_security_set(const struct xattr_handler *handler, | |||
7259 | struct dentry *dentry, const char *name, | 7256 | struct dentry *dentry, const char *name, |
7260 | const void *value, size_t size, int flags) | 7257 | const void *value, size_t size, int flags) |
7261 | { | 7258 | { |
7262 | if (strcmp(name, "") == 0) | ||
7263 | return -EINVAL; | ||
7264 | |||
7265 | return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_SECURITY, | 7259 | return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_SECURITY, |
7266 | name, value, size, flags); | 7260 | name, value, size, flags); |
7267 | } | 7261 | } |
@@ -7345,8 +7339,6 @@ static int ocfs2_xattr_trusted_get(const struct xattr_handler *handler, | |||
7345 | struct dentry *dentry, const char *name, | 7339 | struct dentry *dentry, const char *name, |
7346 | void *buffer, size_t size) | 7340 | void *buffer, size_t size) |
7347 | { | 7341 | { |
7348 | if (strcmp(name, "") == 0) | ||
7349 | return -EINVAL; | ||
7350 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_TRUSTED, | 7342 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_TRUSTED, |
7351 | name, buffer, size); | 7343 | name, buffer, size); |
7352 | } | 7344 | } |
@@ -7355,9 +7347,6 @@ static int ocfs2_xattr_trusted_set(const struct xattr_handler *handler, | |||
7355 | struct dentry *dentry, const char *name, | 7347 | struct dentry *dentry, const char *name, |
7356 | const void *value, size_t size, int flags) | 7348 | const void *value, size_t size, int flags) |
7357 | { | 7349 | { |
7358 | if (strcmp(name, "") == 0) | ||
7359 | return -EINVAL; | ||
7360 | |||
7361 | return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_TRUSTED, | 7350 | return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_TRUSTED, |
7362 | name, value, size, flags); | 7351 | name, value, size, flags); |
7363 | } | 7352 | } |
@@ -7398,8 +7387,6 @@ static int ocfs2_xattr_user_get(const struct xattr_handler *handler, | |||
7398 | { | 7387 | { |
7399 | struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); | 7388 | struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); |
7400 | 7389 | ||
7401 | if (strcmp(name, "") == 0) | ||
7402 | return -EINVAL; | ||
7403 | if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) | 7390 | if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) |
7404 | return -EOPNOTSUPP; | 7391 | return -EOPNOTSUPP; |
7405 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_USER, name, | 7392 | return ocfs2_xattr_get(d_inode(dentry), OCFS2_XATTR_INDEX_USER, name, |
@@ -7412,8 +7399,6 @@ static int ocfs2_xattr_user_set(const struct xattr_handler *handler, | |||
7412 | { | 7399 | { |
7413 | struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); | 7400 | struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); |
7414 | 7401 | ||
7415 | if (strcmp(name, "") == 0) | ||
7416 | return -EINVAL; | ||
7417 | if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) | 7402 | if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) |
7418 | return -EOPNOTSUPP; | 7403 | return -EOPNOTSUPP; |
7419 | 7404 | ||