Skip to content

Commit

Permalink
Merge tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
torvalds committed May 19, 2019
2 parents cb6f873 + 4dd0481 commit 2e2c122
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fs/ubifs/sb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion fs/ubifs/ubifs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fs/ubifs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2e2c122

Please sign in to comment.