projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09a5c31
)
ext4: switch to fscrypt_prepare_link()
author
Eric Biggers
<ebiggers@google.com>
Thu, 19 Oct 2017 00:21:57 +0000
(20:21 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 19 Oct 2017 00:21:57 +0000
(20:21 -0400)
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/namei.c
b/fs/ext4/namei.c
index c1cf020d18895ccedca1690431e009c1f05ad846..b2058500f1dc8556e89fca7d3d9b5521c8fce514 100644
(file)
--- a/
fs/ext4/namei.c
+++ b/
fs/ext4/namei.c
@@
-3221,9
+3221,10
@@
static int ext4_link(struct dentry *old_dentry,
if (inode->i_nlink >= EXT4_LINK_MAX)
return -EMLINK;
- if (ext4_encrypted_inode(dir) &&
- !fscrypt_has_permitted_context(dir, inode))
- return -EPERM;
+
+ err = fscrypt_prepare_link(old_dentry, dir, dentry);
+ if (err)
+ return err;
if ((ext4_test_inode_flag(dir, EXT4_INODE_PROJINHERIT)) &&
(!projid_eq(EXT4_I(dir)->i_projid,