Skip to content

Commit b372e96

Browse files
neilbrownidryomov
authored andcommitted
ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
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>
1 parent fec50db commit b372e96

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/ceph/addr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,10 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
795795
ihold(inode);
796796

797797
if (wbc->sync_mode == WB_SYNC_NONE &&
798-
ceph_inode_to_fs_client(inode)->write_congested)
798+
ceph_inode_to_fs_client(inode)->write_congested) {
799+
redirty_page_for_writepage(wbc, page);
799800
return AOP_WRITEPAGE_ACTIVATE;
801+
}
800802

801803
wait_on_page_fscache(page);
802804

0 commit comments

Comments
 (0)