Skip to content

Commit 481a9b8

Browse files
YueHaibingrichardweinberger
authored andcommitted
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 <[email protected]> Fixes: 9ca2d73 ("ubifs: Limit number of xattrs per inode") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 2bbacd1 commit 481a9b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/ubifs/ubifs.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,13 +2015,17 @@ int ubifs_xattr_set(struct inode *host, const char *name, const void *value,
20152015
size_t size, int flags, bool check_lock);
20162016
ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
20172017
size_t size);
2018-
int ubifs_purge_xattrs(struct inode *host);
20192018

20202019
#ifdef CONFIG_UBIFS_FS_XATTR
20212020
void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
2021+
int ubifs_purge_xattrs(struct inode *host);
20222022
#else
20232023
static inline void ubifs_evict_xattr_inode(struct ubifs_info *c,
20242024
ino_t xattr_inum) { }
2025+
static inline int ubifs_purge_xattrs(struct inode *host)
2026+
{
2027+
return 0;
2028+
}
20252029
#endif
20262030

20272031
#ifdef CONFIG_UBIFS_FS_SECURITY

0 commit comments

Comments
 (0)