OSDN Git Service

fscrypt: new helper function - fscrypt_prepare_lookup()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:43 +0000 (12:15 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 5 Jan 2018 02:20:25 +0000 (18:20 -0800)
commit5cbdd42ad248df655c3a07c0be92078e6e4ebe84
tree7d1e94649ea4f152c4f6d37602197d1282976643
parenta31feba5c18ff73cedb4301c5a0f2ffa7624218b
fscrypt: new helper function - fscrypt_prepare_lookup()

Introduce a helper function which prepares to look up the given dentry
in the given directory.  If the directory is encrypted, it handles
loading the directory's encryption key, setting the dentry's ->d_op to
fscrypt_d_ops, and setting DCACHE_ENCRYPTED_WITH_KEY if the directory's
encryption key is available.

Note: once all filesystems switch over to this, we'll be able to move
fscrypt_d_ops and fscrypt_set_encrypted_dentry() to fscrypt_private.h.

Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/hooks.c
include/linux/fscrypt.h
include/linux/fscrypt_notsupp.h
include/linux/fscrypt_supp.h