summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-05-10 05:21:44 +0200
committerRichard Weinberger <richard@nod.at>2019-05-15 21:56:48 +0200
commit481a9b8073a448f0bd151b7171dbab18b35de55c (patch)
treeb799b8ea04636d4c33ac5eb7dc045352562da0a2 /fs/ubifs
parentMerge tag 'kconfig-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mas... (diff)
downloadlinux-481a9b8073a448f0bd151b7171dbab18b35de55c.tar.xz
linux-481a9b8073a448f0bd151b7171dbab18b35de55c.zip
ubifs: Fix build error without CONFIG_UBIFS_FS_XATTR
Fix gcc build error while CONFIG_UBIFS_FS_XATTR is not set fs/ubifs/dir.o: In function `ubifs_unlink': dir.c:(.text+0x260): undefined reference to `ubifs_purge_xattrs' fs/ubifs/dir.o: In function `do_rename': dir.c:(.text+0x1edc): undefined reference to `ubifs_purge_xattrs' fs/ubifs/dir.o: In function `ubifs_rmdir': dir.c:(.text+0x2638): undefined reference to `ubifs_purge_xattrs' Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/ubifs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 379b9f791ff6..fd7f39990157 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -2015,13 +2015,17 @@ int ubifs_xattr_set(struct inode *host, const char *name, const void *value,
size_t size, int flags, bool check_lock);
ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
size_t size);
-int ubifs_purge_xattrs(struct inode *host);
#ifdef CONFIG_UBIFS_FS_XATTR
void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
+int ubifs_purge_xattrs(struct inode *host);
#else
static inline void ubifs_evict_xattr_inode(struct ubifs_info *c,
ino_t xattr_inum) { }
+static inline int ubifs_purge_xattrs(struct inode *host)
+{
+ return 0;
+}
#endif
#ifdef CONFIG_UBIFS_FS_SECURITY