Skip to content

Commit 2e2c122

Browse files
committed
Merge tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs
Pull UBIFS fixes from Richard Weinberger: - build errors wrt xattrs - mismerge which lead to a wrong Kconfig ifdef - missing endianness conversion * tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: Convert xattr inum to host order ubifs: Use correct config name for encryption ubifs: Fix build error without CONFIG_UBIFS_FS_XATTR
2 parents cb6f873 + 4dd0481 commit 2e2c122

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

fs/ubifs/sb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ int ubifs_read_superblock(struct ubifs_info *c)
748748
goto out;
749749
}
750750

751-
if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION) && c->encrypted) {
751+
if (!IS_ENABLED(CONFIG_FS_ENCRYPTION) && c->encrypted) {
752752
ubifs_err(c, "file system contains encrypted files but UBIFS"
753753
" was built without crypto support.");
754754
err = -EINVAL;
@@ -941,7 +941,7 @@ int ubifs_enable_encryption(struct ubifs_info *c)
941941
int err;
942942
struct ubifs_sb_node *sup = c->sup_node;
943943

944-
if (!IS_ENABLED(CONFIG_UBIFS_FS_ENCRYPTION))
944+
if (!IS_ENABLED(CONFIG_FS_ENCRYPTION))
945945
return -EOPNOTSUPP;
946946

947947
if (c->encrypted)

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

fs/ubifs/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ int ubifs_purge_xattrs(struct inode *host)
527527
fname_name(&nm) = xent->name;
528528
fname_len(&nm) = le16_to_cpu(xent->nlen);
529529

530-
xino = ubifs_iget(c->vfs_sb, xent->inum);
530+
xino = ubifs_iget(c->vfs_sb, le64_to_cpu(xent->inum));
531531
if (IS_ERR(xino)) {
532532
err = PTR_ERR(xino);
533533
ubifs_err(c, "dead directory entry '%s', error %d",

0 commit comments

Comments
 (0)