summaryrefslogtreecommitdiff
path: root/fs/f2fs/xattr.h
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@mykernel.net>2020-05-26 17:05:43 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-05-26 18:56:10 -0700
commit195f406543e555611330b98ea8c21f113a192fc3 (patch)
tree338dfcfa50452c07ca892198996c72eae4467555 /fs/f2fs/xattr.h
parent6d7c865c2714b122a940774990cfb1d87b57294a (diff)
f2fs: code cleanup by removing ifdef macro surrounding
Define f2fs_listxattr and to NULL when CONFIG_F2FS_FS_XATTR is not enabled, then we can remove many ugly ifdef macros in the code. Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.h')
-rw-r--r--fs/f2fs/xattr.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/f2fs/xattr.h b/fs/f2fs/xattr.h
index 6a192e6c7a9e..416d652774a3 100644
--- a/fs/f2fs/xattr.h
+++ b/fs/f2fs/xattr.h
@@ -136,6 +136,7 @@ extern void f2fs_destroy_xattr_caches(struct f2fs_sb_info *);
#else
#define f2fs_xattr_handlers NULL
+#define f2fs_listxattr NULL
static inline int f2fs_setxattr(struct inode *inode, int index,
const char *name, const void *value, size_t size,
struct page *page, int flags)
@@ -148,11 +149,6 @@ static inline int f2fs_getxattr(struct inode *inode, int index,
{
return -EOPNOTSUPP;
}
-static inline ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer,
- size_t buffer_size)
-{
- return -EOPNOTSUPP;
-}
static inline int f2fs_init_xattr_caches(struct f2fs_sb_info *sbi) { return 0; }
static inline void f2fs_destroy_xattr_caches(struct f2fs_sb_info *sbi) { }
#endif