Re: [PATCH 2/3] fs: Introduce { freeze, thaw }_active_super functions

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

 



On Wed, Nov 30, 2022 at 12:07:34AM +0100, Andreas Gruenbacher wrote:

> -int freeze_super(struct super_block *sb)
> +int freeze_active_super(struct super_block *sb)
>  {
>  	int ret;
>  
> -	atomic_inc(&sb->s_active);
>  	down_write(&sb->s_umount);
>  	if (sb->s_writers.frozen != SB_UNFROZEN) {
>  		deactivate_locked_super(sb);

Not fond of the calling conventions, to be honest...  "On success return 0;
on failure return -E... *and* drop an active reference passed by the caller"?

If you go that way, at least take the deactivate_locked_super() into the
caller and I would argue that ->s_umount handling also belongs in the caller,
both grabbing and dropping it.



[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