On 2020/6/23 下午11:03, Johannes Thumshirn wrote:
> On 23/06/2020 16:58, Anand Jain wrote:
>>
>>
>>
>>> +static int check_nocow_nolock(struct btrfs_inode *inode, loff_t pos,
>>> + size_t *write_bytes)
>>> +{
>>> + return check_can_nocow(inode, pos, write_bytes, false);
>>> +}
>>
>>
>>> +int btrfs_check_nocow_lock(struct btrfs_inode *inode, loff_t pos,
>>> + size_t *write_bytes)
>>> +{
>>> + return check_can_nocow(inode, pos, write_bytes, false);
>>> +}
>>
>>
>> Both functions are same. Something obviously not ok.
>
> Oh right, how could I have missed that. The _lock will need 'true'
> for the 3rd parameter.
>
Holly sh*t, how could the test passed without extra failures.
Definitely the most embarrassing bug...
Thanks for pointing it out,
Qu