diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index 1447ea0538e4..a340a6f6f531 100644 --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static unsigned int num_prealloc_crypto_pages = 32; @@ -352,6 +353,9 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) struct fscrypt_info *ci; int dir_has_key, cached_with_key; + if (flags & LOOKUP_RCU) + return -ECHILD; + dir = dget_parent(dentry); if (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) { dput(dir);