gfs2: jdata writepage fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 1 Feb 2023 14:08:50 +0000 (15:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:32 +0000 (09:39 +0100)
commit321b8b2b0b2b3fd3dbb49756d5a8789406246dad
treef9a84289a042e0066288a95f0dd9b11fc2d5481a
parent7cbd5bdb5bd4404a5da4309521134b42c65846c0
gfs2: jdata writepage fix

[ Upstream commit cbb60951ce18c9b6e91d2eb97deb41d8ff616622 ]

The ->writepage() and ->writepages() operations are supposed to write
entire pages.  However, on filesystems with a block size smaller than
PAGE_SIZE, __gfs2_jdata_writepage() only adds the first block to the
current transaction instead of adding the entire page.  Fix that.

Fixes: 18ec7d5c3f43 ("[GFS2] Make journaled data files identical to normal files on disk")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/gfs2/aops.c