Re: [PATCH 5/6] super: use common iterator (Part 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2025-03-28 at 17:15 +0100, Christian Brauner wrote:
[...]
> +static inline void super_cb_grabbed(struct super_block *sb,
> +				    void (*f)(struct super_block *,
> void *),
> +				    void *arg)
> +{
> +	if (super_lock_excl(sb)) {
> +		bool active = atomic_inc_not_zero(&sb->s_active);
> +		super_unlock_excl(sb);
> +		if (active)
> +			f(sb, arg);
> +		deactivate_super(sb);

I don't think this can be right: if we fail to increment s_active
because it's zero, we shouldn't call deactivate_super(), should we?

Regards,

James






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux