Commit 5734fa21 authored by Gao Xiang's avatar Gao Xiang Committed by Greg Kroah-Hartman

staging: erofs: fix dummy functions erofs_{get, list}xattr

dummy functions erofs_{get,list}xattr should be inlined
without xattr enabled.
Signed-off-by: default avatarYue Hu <zbestahu@gmail.com>
[ Gao Xiang : this patch was "staging: erofs: remove needless
              dummy functions of erofs_{get,list}xattr. "]
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarGao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190731155752.210602-4-gaoxiang25@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 57b78c9f
...@@ -39,6 +39,7 @@ static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi, ...@@ -39,6 +39,7 @@ static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ; return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
} }
#ifdef CONFIG_EROFS_FS_XATTR
extern const struct xattr_handler erofs_xattr_user_handler; extern const struct xattr_handler erofs_xattr_user_handler;
extern const struct xattr_handler erofs_xattr_trusted_handler; extern const struct xattr_handler erofs_xattr_trusted_handler;
#ifdef CONFIG_EROFS_FS_SECURITY #ifdef CONFIG_EROFS_FS_SECURITY
...@@ -64,25 +65,24 @@ static const struct xattr_handler *xattr_handler_map[] = { ...@@ -64,25 +65,24 @@ static const struct xattr_handler *xattr_handler_map[] = {
xattr_handler_map[idx] : NULL; xattr_handler_map[idx] : NULL;
} }
#ifdef CONFIG_EROFS_FS_XATTR
extern const struct xattr_handler *erofs_xattr_handlers[]; extern const struct xattr_handler *erofs_xattr_handlers[];
int erofs_getxattr(struct inode *, int, const char *, void *, size_t); int erofs_getxattr(struct inode *, int, const char *, void *, size_t);
ssize_t erofs_listxattr(struct dentry *, char *, size_t); ssize_t erofs_listxattr(struct dentry *, char *, size_t);
#else #else
static int __maybe_unused erofs_getxattr(struct inode *inode, int index, static inline int erofs_getxattr(struct inode *inode, int index,
const char *name, const char *name, void *buffer,
void *buffer, size_t buffer_size) size_t buffer_size)
{ {
return -ENOTSUPP; return -ENOTSUPP;
} }
static ssize_t __maybe_unused erofs_listxattr(struct dentry *dentry, static inline ssize_t erofs_listxattr(struct dentry *dentry,
char *buffer, size_t buffer_size) char *buffer, size_t buffer_size)
{ {
return -ENOTSUPP; return -ENOTSUPP;
} }
#endif #endif /* !CONFIG_EROFS_FS_XATTR */
#ifdef CONFIG_EROFS_FS_POSIX_ACL #ifdef CONFIG_EROFS_FS_POSIX_ACL
struct posix_acl *erofs_get_acl(struct inode *inode, int type); struct posix_acl *erofs_get_acl(struct inode *inode, int type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment