ubifs: switch to fscrypt_prepare_link()
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
7e35c4dac3
commit
5653878c8c
|
@ -743,9 +743,9 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir,
|
||||||
ubifs_assert(inode_is_locked(dir));
|
ubifs_assert(inode_is_locked(dir));
|
||||||
ubifs_assert(inode_is_locked(inode));
|
ubifs_assert(inode_is_locked(inode));
|
||||||
|
|
||||||
if (ubifs_crypt_is_encrypted(dir) &&
|
err = fscrypt_prepare_link(old_dentry, dir, dentry);
|
||||||
!fscrypt_has_permitted_context(dir, inode))
|
if (err)
|
||||||
return -EPERM;
|
return err;
|
||||||
|
|
||||||
err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
|
err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Reference in New Issue