Re: [GIT PULL] gfs2 fix

From: Linus Torvalds
Date: Tue May 03 2022 - 18:41:58 EST


On Tue, May 3, 2022 at 2:35 PM Andreas Gruenbacher <agruenba@xxxxxxxxxx> wrote:
>
> More testing still ongoing, but the following patch seems to fix the
> data corruption.

Fingers crossed.

> + truncate_pagecache_range(inode, hstart, hend - 1);
> + if (hstart < hend)
> + punch_hole(ip, hstart, hend - hstart);

Why doesn't that "hstart < hend" condition cover both the truncate and
the hole punch?

Linus