gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 13 Jan 2025 18:31:28 +0000 (19:31 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 14 Jan 2025 17:54:08 +0000 (18:54 +0100)
commit7c9d9223802fbed4dee1ae301661bf346964c9d2
treefac3e2a7d1a03dab8bba20496a87734f0b7e45e3
parentead64b20f16e38443aded90dc8491d25f4f5bd39
gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag

Truncate an inode's address space when flipping the GFS2_DIF_JDATA flag:
depending on that flag, the pages in the address space will either use
buffer heads or iomap_folio_state structs, and we cannot mix the two.

Reported-by: Kun Hu <huk23@m.fudan.edu.cn>, Jiaji Qin <jjtan24@m.fudan.edu.cn>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c