]> www.infradead.org Git - users/hch/block.git/commitdiff
ceph: remove the incorrect Fw reference check when dirtying pages
authorXiubo Li <xiubli@redhat.com>
Wed, 4 Sep 2024 22:22:18 +0000 (06:22 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 24 Sep 2024 20:51:33 +0000 (22:51 +0200)
When doing the direct-io reads it will also try to mark pages dirty,
but for the read path it won't hold the Fw caps and there is case
will it get the Fw reference.

Fixes: 5dda377cf0a6 ("ceph: set i_head_snapc when getting CEPH_CAP_FILE_WR reference")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c

index c4744a02db753c761491b5bf4ca12977342db114..0df4623785ddb82dc373a96c43f9dbeef17782e0 100644 (file)
@@ -95,7 +95,6 @@ static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio)
 
        /* 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,