aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ubifs/sb.c4
-rw-r--r--fs/ubifs/ubifs.h6
-rw-r--r--fs/ubifs/xattr.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 2afc8b1d4c3b..3ca41965db6e 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -748,7 +748,7 @@ int ubifs_read_superblock(struct ubifs_info *c)
748 goto out; 748 goto out;
749 } 749 }
750 750
751 if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION) && c->encrypted) { 751 if (!IS_ENABLED(CONFIG_FS_ENCRYPTION) && c->encrypted) {
752 ubifs_err(c, "file system contains encrypted files but UBIFS" 752 ubifs_err(c, "file system contains encrypted files but UBIFS"
753 " was built without crypto support."); 753 " was built without crypto support.");
754 err = -EINVAL; 754 err = -EINVAL;
@@ -941,7 +941,7 @@ int ubifs_enable_encryption(struct ubifs_info *c)
941 int err; 941 int err;
942 struct ubifs_sb_node *sup = c->sup_node; 942 struct ubifs_sb_node *sup = c->sup_node;
943 943
944 if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION)) 944 if (!IS_ENABLED(CONFIG_FS_ENCRYPTION))
945 return -EOPNOTSUPP; 945 return -EOPNOTSUPP;
946 946
947 if (c->encrypted) 947 if (c->encrypted)
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,
2015 size_t size, int flags, bool check_lock); 2015 size_t size, int flags, bool check_lock);
2016ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf, 2016ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
2017 size_t size); 2017 size_t size);
2018int ubifs_purge_xattrs(struct inode *host);
2019 2018
2020#ifdef CONFIG_UBIFS_FS_XATTR 2019#ifdef CONFIG_UBIFS_FS_XATTR
2021void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum); 2020void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
2021int ubifs_purge_xattrs(struct inode *host);
2022#else 2022#else
2023static inline void ubifs_evict_xattr_inode(struct ubifs_info *c, 2023static inline void ubifs_evict_xattr_inode(struct ubifs_info *c,
2024 ino_t xattr_inum) { } 2024 ino_t xattr_inum) { }
2025static inline int ubifs_purge_xattrs(struct inode *host)
2026{
2027 return 0;
2028}
2025#endif 2029#endif
2026 2030
2027#ifdef CONFIG_UBIFS_FS_SECURITY 2031#ifdef CONFIG_UBIFS_FS_SECURITY
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index acab3181ab35..bcfed27e8997 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -527,7 +527,7 @@ int ubifs_purge_xattrs(struct inode *host)
527 fname_name(&nm) = xent->name; 527 fname_name(&nm) = xent->name;
528 fname_len(&nm) = le16_to_cpu(xent->nlen); 528 fname_len(&nm) = le16_to_cpu(xent->nlen);
529 529
530 xino = ubifs_iget(c->vfs_sb, xent->inum); 530 xino = ubifs_iget(c->vfs_sb, le64_to_cpu(xent->inum));
531 if (IS_ERR(xino)) { 531 if (IS_ERR(xino)) {
532 err = PTR_ERR(xino); 532 err = PTR_ERR(xino);
533 ubifs_err(c, "dead directory entry '%s', error %d", 533 ubifs_err(c, "dead directory entry '%s', error %d",