Re: [PATCH V3 4/6] erofs: introduce fscache-based domain
From: JeffleXu
Date: Wed Sep 14 2022 - 23:30:03 EST
On 9/14/22 9:21 PM, Gao Xiang wrote:
>> @@ -518,7 +614,13 @@ void erofs_fscache_unregister_fs(struct super_block *sb)
>> struct erofs_sb_info *sbi = EROFS_SB(sb);
>>
>> erofs_fscache_unregister_cookie(sbi->s_fscache);
>> - fscache_relinquish_volume(sbi->volume, NULL, false);
>> sbi->s_fscache = NULL;
>> +
>> + if (sbi->domain)
>> + erofs_fscache_domain_put(sbi->domain);
>> + else
>> + fscache_relinquish_volume(sbi->volume, NULL, false);
>> +
>
> How about using one helper and pass in sb directly instead?
>
Then this helper has only one caller...
--
Thanks,
Jingbo