aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-12-02 18:20:37 -0800
committerEric Biggers <ebiggers@google.com>2020-12-02 18:25:01 -0800
commitec0caa974cd092549ab282deb8ec7ea73b36eba0 (patch)
tree9609384a2e6542df8862a9f2d903e62dbc4e10c8 /fs/f2fs
parentext4: don't call fscrypt_get_encryption_info() from dx_show_leaf() (diff)
downloadlinux-dev-ec0caa974cd092549ab282deb8ec7ea73b36eba0.tar.xz
linux-dev-ec0caa974cd092549ab282deb8ec7ea73b36eba0.zip
fscrypt: introduce fscrypt_prepare_readdir()
The last remaining use of fscrypt_get_encryption_info() from filesystems is for readdir (->iterate_shared()). Every other call is now in fs/crypto/ as part of some other higher-level operation. We need to add a new argument to fscrypt_get_encryption_info() to indicate whether the encryption policy is allowed to be unrecognized or not. Doing this is easier if we can work with high-level operations rather than direct filesystem use of fscrypt_get_encryption_info(). So add a function fscrypt_prepare_readdir() which wraps the call to fscrypt_get_encryption_info() for the readdir use case. Reviewed-by: Andreas Dilger <adilger@dilger.ca> Link: https://lore.kernel.org/r/20201203022041.230976-6-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 47bee953fc8d..049500f1e764 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -1022,7 +1022,7 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
int err = 0;
if (IS_ENCRYPTED(inode)) {
- err = fscrypt_get_encryption_info(inode);
+ err = fscrypt_prepare_readdir(inode);
if (err)
goto out;