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.