From ae928b45d69409e7e0b8171dafd84d558a0aa327 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:13 +0100 Subject: [PATCH] Revert "ceph: remove the incorrect Fw reference check when dirtying pages" This reverts commit 0c92def6af52761ca47d89ae42ca645594fd0674. --- fs/ceph/addr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 2362f2591..3465ff95c 100755 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -91,6 +91,7 @@ static int ceph_set_page_dirty(struct page *page) /* dirty the head */ spin_lock(&ci->i_ceph_lock); + BUG_ON(ci->i_wr_ref == 0); // caller should hold Fw reference if (__ceph_have_pending_cap_snap(ci)) { struct ceph_cap_snap *capsnap = list_last_entry(&ci->i_cap_snaps,