generic: ensure that page is properly filled before write
authorJeff Layton <jlayton@kernel.org>
Fri, 2 Jul 2021 13:40:24 +0000 (09:40 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Jul 2021 11:02:25 +0000 (19:02 +0800)
commit80b8fe47d01347d9c5c433440861f41b8954463e
tree5f635f956c6a646a9b4f34cc1b96640d2cb21201
parent3be0233fbbcfc4a8919eae08330af7831fe03a70
generic: ensure that page is properly filled before write

We had a broken optimization in cephfs and netfs lib that could
cause part of a page to be improperly zeroed-out when writing to an
offset that was beyond the EOF but in an existing page.

Add a simple test that would have caught this.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/639 [new file with mode: 0755]
tests/generic/639.out [new file with mode: 0644]