diff mbox series

fscrypt: update comment for do_remove_key()

Message ID 20231206002127.14790-1-ebiggers@kernel.org (mailing list archive)
State Accepted
Headers show
Series fscrypt: update comment for do_remove_key() | expand

Commit Message

Eric Biggers Dec. 6, 2023, 12:21 a.m. UTC
From: Eric Biggers <ebiggers@google.com>

Adjust a comment that was missed during commit 15baf55481de
("fscrypt: track master key presence separately from secret").

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/crypto/keyring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
diff mbox series

Patch

diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c
index f34a9b0b9e922..0edf0b58daa76 100644
--- a/fs/crypto/keyring.c
+++ b/fs/crypto/keyring.c
@@ -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)