diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 2afc8b1d4c3b6b5128fc3cd9b74ebd345cbc6794..3ca41965db6e8d67156ea1f6f052871db28e3238 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -748,7 +748,7 @@ int ubifs_read_superblock(struct ubifs_info *c) goto out; } - if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION) && c->encrypted) { + if (!IS_ENABLED(CONFIG_FS_ENCRYPTION) && c->encrypted) { ubifs_err(c, "file system contains encrypted files but UBIFS" " was built without crypto support."); err = -EINVAL; @@ -941,7 +941,7 @@ int ubifs_enable_encryption(struct ubifs_info *c) int err; struct ubifs_sb_node *sup = c->sup_node; - if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION)) + if (!IS_ENABLED(CONFIG_FS_ENCRYPTION)) return -EOPNOTSUPP; if (c->encrypted) diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 379b9f791ff63edc9890c5f43438630a1e67c3ad..fd7f399901579cef4ab3ec862737365e143fca84 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 diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index acab3181ab35f655e858a93558309be854d1d1b7..bcfed27e899740b7715c483cc6f58b5b129e74ba 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -527,7 +527,7 @@ int ubifs_purge_xattrs(struct inode *host) fname_name(&nm) = xent->name; fname_len(&nm) = le16_to_cpu(xent->nlen); - xino = ubifs_iget(c->vfs_sb, xent->inum); + xino = ubifs_iget(c->vfs_sb, le64_to_cpu(xent->inum)); if (IS_ERR(xino)) { err = PTR_ERR(xino); ubifs_err(c, "dead directory entry '%s', error %d",