[lvc-project] [PATCH] ocfs2: fix buffer head management in ocfs2_read_blocks()
Andrew Morton
akpm at linux-foundation.org
Sat May 30 05:01:01 MSK 2026
On Fri, 29 May 2026 12:41:28 +0300 Dmitry Antipov <dmantipov at yandex.ru> wrote:
> Cc: Joel Becker <jlbec at evilplan.org>, Mark Fasheh <mark at fasheh.com>, Changwei Ge <ge.changwei at h3c.com>, ocfs2-devel at lists.linux.dev, lvc-project at linuxtesting.org, Dmitry Antipov <dmantipov at yandex.ru>, syzbot+caacd220635a9cc3bac9 at syzkaller.appspotmail.com
fyi, ocfs2-devel is not among the mailing lists which are monitored
by Sashiko AI review. To benefit from that review you may choose to cc
linux-kernel on patches.
> Subject: [PATCH] ocfs2: fix buffer head management in ocfs2_read_blocks()
> Date: Fri, 29 May 2026 12:41:28 +0300
> X-Mailer: git-send-email 2.54.0
>
> In 'ocfs2_read_blocks()', caller should't assume that buffer head
> returned by 'sb_getblk()' is exclusively owned and so 'put_bh()'
> always drops b_count from 1 to 0. If it is not so, buffer head
> remains on hold and likely to be returned by the next call to
> 'sb_getblk()' unchanged - that is, with BH_Uptodate bit set even
> if it has failed validation previously, thus allowing to insert
> that buffer head into OCFS2 metadata cache and submit it to upper
> layers. To avoid such a scenario, BH_Uptodate should be cleared
> immediately after 'validate()' callback has detected some data
> inconsistency.
Added, thanks.
More information about the lvc-project
mailing list