diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-01 19:23:41 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-01 19:23:41 -0800 |
commit | f4bc6601e2d81ef8fb62f8e58da15aa92aff7542 (patch) | |
tree | 305489785fe256484206e36fb191ab50f82d4e1f | |
parent | ebe8fc6799bb090d56b4042d054549c42f344552 (diff) | |
parent | bfae7d5cd2bef44fcc95f34c72d6843f91fa49c9 (diff) |
Merge "ext4/fscrypto: avoid RCU lookup in d_revalidate"
-rw-r--r-- | fs/ext4/crypto.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c index 1bb67391225a..664f42c850b7 100644 --- a/fs/ext4/crypto.c +++ b/fs/ext4/crypto.c @@ -34,6 +34,7 @@ #include <linux/random.h> #include <linux/scatterlist.h> #include <linux/spinlock_types.h> +#include <linux/namei.h> #include "ext4_extents.h" #include "xattr.h" @@ -487,6 +488,9 @@ static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags) struct ext4_crypt_info *ci; int dir_has_key, cached_with_key; + if (flags & LOOKUP_RCU) + return -ECHILD; + dir = dget_parent(dentry); if (!ext4_encrypted_inode(d_inode(dir))) { dput(dir); |