Skip to content

Commit

Permalink
ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
Browse files Browse the repository at this point in the history
[ Upstream commit b372e96 ]

The page has been marked clean before writepage is called.  If we don't
redirty it before postponing the write, it might never get written.

Cc: stable@vger.kernel.org
Fixes: 503d4fa ("ceph: remove reliance on bdi congestion")
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
neilbrown authored and gregkh committed Apr 27, 2024
1 parent 985b9ee commit dbfb523
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ceph/addr.c
Expand Up @@ -803,8 +803,10 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
ihold(inode);

if (wbc->sync_mode == WB_SYNC_NONE &&
ceph_inode_to_fs_client(inode)->write_congested)
ceph_inode_to_fs_client(inode)->write_congested) {
redirty_page_for_writepage(wbc, page);
return AOP_WRITEPAGE_ACTIVATE;
}

wait_on_page_fscache(page);

Expand Down

0 comments on commit dbfb523

Please sign in to comment.