[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] file-posix: Clear bs->bl.zoned on error
From: |
Sam Li |
Subject: |
Re: [PATCH 1/5] file-posix: Clear bs->bl.zoned on error |
Date: |
Fri, 25 Aug 2023 00:57:28 +0800 |
Hanna Czenczek <hreitz@redhat.com> 于2023年8月24日周四 23:53写道:
>
> bs->bl.zoned is what indicates whether the zone information is present
> and valid; it is the only thing that raw_refresh_zoned_limits() sets if
> CONFIG_BLKZONED is not defined, and it is also the only thing that it
> sets if CONFIG_BLKZONED is defined, but there are no zones.
>
> Make sure that it is always set to BLK_Z_NONE if there is an error
> anywhere in raw_refresh_zoned_limits() so that we do not accidentally
> announce zones while our information is incomplete or invalid.
>
> This also fixes a memory leak in the last error path in
> raw_refresh_zoned_limits().
>
> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
> ---
> block/file-posix.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
Reviewed-by: Sam Li <faithilikerun@gmail.com>
- [PATCH 0/5] file-posix: Clean up and fix zoned checks, Hanna Czenczek, 2023/08/24
- [PATCH 1/5] file-posix: Clear bs->bl.zoned on error, Hanna Czenczek, 2023/08/24
- Re: [PATCH 1/5] file-posix: Clear bs->bl.zoned on error,
Sam Li <=
- [PATCH 3/5] file-posix: Fix zone update in I/O error path, Hanna Czenczek, 2023/08/24
- [PATCH 2/5] file-posix: Check bs->bl.zoned for zone info, Hanna Czenczek, 2023/08/24
- [PATCH 4/5] file-posix: Simplify raw_co_prw's 'out' zone code, Hanna Czenczek, 2023/08/24
- [PATCH 5/5] tests/file-io-error: New test, Hanna Czenczek, 2023/08/24
- Re: [PATCH 0/5] file-posix: Clean up and fix zoned checks, Sam Li, 2023/08/24