* [PATCH] isofs: release zisofs block pointer buffer head
@ 2026-07-21 9:11 Yichong Chen
2026-07-27 14:42 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Yichong Chen @ 2026-07-21 9:11 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-kernel, Yichong Chen
zisofs_fill_pages() reads the compressed block pointer table.
The error paths release the current buffer_head.
The loop also releases the old buffer_head when it advances.
However, the success path leaves the last buffer_head referenced.
Release it before returning success.
Fixes: 59bc055211b8 ("zisofs: Implement reading of compressed files when PAGE_CACHE_SIZE > compress block size")
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
---
fs/isofs/compress.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index 3fda92358e22..f9869d62b850 100644
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -293,6 +293,7 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount,
memzero_page(*pages, poffset, PAGE_SIZE - poffset);
SetPageUptodate(*pages);
}
+ brelse(bh);
return 0;
}
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] isofs: release zisofs block pointer buffer head
2026-07-21 9:11 [PATCH] isofs: release zisofs block pointer buffer head Yichong Chen
@ 2026-07-27 14:42 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2026-07-27 14:42 UTC (permalink / raw)
To: Yichong Chen; +Cc: Jan Kara, linux-fsdevel, linux-kernel
On Tue 21-07-26 17:11:52, Yichong Chen wrote:
> zisofs_fill_pages() reads the compressed block pointer table.
>
> The error paths release the current buffer_head.
>
> The loop also releases the old buffer_head when it advances.
>
> However, the success path leaves the last buffer_head referenced.
>
> Release it before returning success.
>
> Fixes: 59bc055211b8 ("zisofs: Implement reading of compressed files when PAGE_CACHE_SIZE > compress block size")
> Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
Thanks! I've added the patch to my tree.
Honza
> ---
> fs/isofs/compress.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
> index 3fda92358e22..f9869d62b850 100644
> --- a/fs/isofs/compress.c
> +++ b/fs/isofs/compress.c
> @@ -293,6 +293,7 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount,
> memzero_page(*pages, poffset, PAGE_SIZE - poffset);
> SetPageUptodate(*pages);
> }
> + brelse(bh);
> return 0;
> }
>
> --
> 2.51.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-27 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21 9:11 [PATCH] isofs: release zisofs block pointer buffer head Yichong Chen
2026-07-27 14:42 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®