summaryrefslogtreecommitdiff
path: root/fs/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-01-10 10:24:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-01-10 10:24:49 -0800
commit17b9e388c619ea4f1eae97833cdcadfbfe041650 (patch)
treec887b1fd3e3d069aacdbbf130492af828645b0c8 /fs/super.c
parent49f4810356f7d4294ad63dc70fe3c65ca3b8ada9 (diff)
parent2a0e85719892a1d63f8f287563e2c1778a77879e (diff)
Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux
Pull fscrypt updates from Eric Biggers: "Adjust the timing of the fscrypt keyring destruction, to prepare for btrfs's fscrypt support. Also document that CephFS supports fscrypt now" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fs: move fscrypt keyring destruction to after ->put_super f2fs: move release of block devices to after kill_block_super() fscrypt: document that CephFS supports fscrypt now fscrypt: update comment for do_remove_key() fscrypt.rst: update definition of struct fscrypt_context_v2
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/super.c b/fs/super.c
index e35936000408..d35e85295489 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -637,12 +637,6 @@ void generic_shutdown_super(struct super_block *sb)
fsnotify_sb_delete(sb);
security_sb_delete(sb);
- /*
- * Now that all potentially-encrypted inodes have been evicted,
- * the fscrypt keyring can be destroyed.
- */
- fscrypt_destroy_keyring(sb);
-
if (sb->s_dio_done_wq) {
destroy_workqueue(sb->s_dio_done_wq);
sb->s_dio_done_wq = NULL;
@@ -651,6 +645,12 @@ void generic_shutdown_super(struct super_block *sb)
if (sop->put_super)
sop->put_super(sb);
+ /*
+ * Now that all potentially-encrypted inodes have been evicted,
+ * the fscrypt keyring can be destroyed.
+ */
+ fscrypt_destroy_keyring(sb);
+
if (CHECK_DATA_CORRUPTION(!list_empty(&sb->s_inodes),
"VFS: Busy inodes after unmount of %s (%s)",
sb->s_id, sb->s_type->name)) {