Re: [PATCH 1/2] fat: batch synchronous mirror writes
From: OGAWA Hirofumi
Date: Mon Oct 26 2026 - 03:40:01 EST
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> writes:
> Matheus Alves de Almeida <matheus.aalmeida@xxxxxxxxxxxx> writes:
>
>> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
>> index e79762cf1975..f8f89b947baf 100644
>> --- a/fs/fat/misc.c
>> +++ b/fs/fat/misc.c
>> @@ -365,3 +365,9 @@ int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs)
>> }
>> return err;
>> }
>> +
>> +void fat_brelse_array(struct buffer_head *bhs[], int n)
>> +{
>> + while (--n >= 0)
>> + brelse(bhs[n]);
>> +}
>
> I'd like this is noop if n == 0, possibly easier to use and safer in future.
Ouch, it works as is.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>