ceph: mark directory as non-complete after loading key
authorLuís Henriques <lhenriques@suse.de>
Tue, 29 Nov 2022 10:39:49 +0000 (10:39 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 24 Aug 2023 09:24:35 +0000 (11:24 +0200)
commit14e034a61c908d4479be1a7ee9fe5b8d3d1f09b8
tree5a8a46cbfaed77a5df049eb2036c1aaa58acf2bc
parente127e03009a3a3c26f00d0b2703c6e0e47927aec
ceph: mark directory as non-complete after loading key

When setting a directory's crypt context, ceph_dir_clear_complete()
needs to be called otherwise if it was complete before, any existing
(old) dentry will still be valid.

This patch adds a wrapper around __fscrypt_prepare_readdir() which will
ensure a directory is marked as non-complete if key status changes.

[ xiubli: revise commit title per Milind ]

Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/crypto.c
fs/ceph/crypto.h
fs/ceph/dir.c
fs/ceph/mds_client.c