]> git.dujemihanovic.xyz Git - linux.git/commitdiff
affs: free affs_sb_info with kfree_rcu()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 19 Sep 2023 23:36:07 +0000 (19:36 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Feb 2024 07:10:31 +0000 (02:10 -0500)
one of the flags in it is used by ->d_hash()/->d_compare()

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/affs/affs.h
fs/affs/super.c

index 60685ec76d983523f15da7c7e97b38634b750c07..2e612834329ac127ae6e63d802a7b31b89558b0c 100644 (file)
@@ -105,6 +105,7 @@ struct affs_sb_info {
        int work_queued;                /* non-zero delayed work is queued */
        struct delayed_work sb_work;    /* superblock flush delayed work */
        spinlock_t work_lock;           /* protects sb_work and work_queued */
+       struct rcu_head rcu;
 };
 
 #define AFFS_MOUNT_SF_INTL             0x0001 /* International filesystem. */
index 58b391446ae1fd97e48891c82ec8d88f32314303..b56a95cf414a44277783e7242c33cba5cb818707 100644 (file)
@@ -640,7 +640,7 @@ static void affs_kill_sb(struct super_block *sb)
                affs_brelse(sbi->s_root_bh);
                kfree(sbi->s_prefix);
                mutex_destroy(&sbi->s_bmlock);
-               kfree(sbi);
+               kfree_rcu(sbi, rcu);
        }
 }