Skip to content

Commit 529f89a

Browse files
author
Al Viro
committed
affs: free affs_sb_info with kfree_rcu()
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>
1 parent cdb67fd commit 529f89a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

fs/affs/affs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ struct affs_sb_info {
105105
int work_queued; /* non-zero delayed work is queued */
106106
struct delayed_work sb_work; /* superblock flush delayed work */
107107
spinlock_t work_lock; /* protects sb_work and work_queued */
108+
struct rcu_head rcu;
108109
};
109110

110111
#define AFFS_MOUNT_SF_INTL 0x0001 /* International filesystem. */

fs/affs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ static void affs_kill_sb(struct super_block *sb)
640640
affs_brelse(sbi->s_root_bh);
641641
kfree(sbi->s_prefix);
642642
mutex_destroy(&sbi->s_bmlock);
643-
kfree(sbi);
643+
kfree_rcu(sbi, rcu);
644644
}
645645
}
646646

0 commit comments

Comments
 (0)