Skip to content

Commit

Permalink
ubifs: switch to fscrypt_prepare_link()
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
ebiggers authored and richardweinberger committed Jan 17, 2018
1 parent 7e35c4d commit 5653878
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(inode));

if (ubifs_crypt_is_encrypted(dir) &&
!fscrypt_has_permitted_context(dir, inode))
return -EPERM;
err = fscrypt_prepare_link(old_dentry, dir, dentry);
if (err)
return err;

err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
if (err)
Expand Down

0 comments on commit 5653878

Please sign in to comment.