fscrypt: update comment for do_remove_key()
Eric Biggers
maintainerPATCH 1/1 fscrypt: update comment for do_remove_key()
From: Eric Biggers <[email protected]>
Adjust a comment that was missed during commit 15baf55481de ("fscrypt: track master key presence separately from secret").
Signed-off-by Eric Biggers <[email protected]>
--- fs/crypto/keyring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/crypto/keyring.c +3 -3
@@ -995,23 +995,23 @@ static int try_to_lock_encrypted_files(struct super_block *sb, }/* * Try to remove an fscrypt master encryption key. * * FS_IOC_REMOVE_ENCRYPTION_KEY (all_users=false) removes the current user's * claim to the key, then removes the key itself if no other users have claims. * FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS (all_users=true) always removes the * key itself. * -* To "remove the key itself", first we wipe the actual master key secret, so -* that no more inodes can be unlocked with it. Then we try to evict all cached -* inodes that had been unlocked with the key. +* To "remove the key itself", first we transition the key to the "incompletely +* removed" state, so that no more inodes can be unlocked with it. Then we try +* to evict all cached inodes that had been unlocked with the key. * * If all inodes were evicted, then we unlink the fscrypt_master_key from the * keyring. Otherwise it remains in the keyring in the "incompletely removed" * state where it tracks the list of remaining inodes. Userspace can execute * the ioctl again later to retry eviction, or alternatively can re-add the key. * * For more details, see the "Removing keys" section of * Documentation/filesystems/fscrypt.rst. */ static int do_remove_key (struct file *filp,void __user *_uarg,bool all_users)
base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
Signature · 1 line
2.43.0