From: Jeff Layton Date: Fri, 25 Sep 2020 13:27:09 +0000 (-0400) Subject: ceph: don't WARN when removing caps due to blocklisting X-Git-Tag: v5.11-rc1~82^2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc167e38a014e04e4484b969ee05765232249b0d;p=thirdparty%2Flinux.git ceph: don't WARN when removing caps due to blocklisting We expect to remove dirty caps when the client is blocklisted. Don't throw a warning in that case. [ idryomov: break unnecessarily long line ] Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index ded4229c314a0..8552d1082b0ed 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1149,7 +1149,8 @@ void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release) /* remove from inode's cap rbtree, and clear auth cap */ rb_erase(&cap->ci_node, &ci->i_caps); if (ci->i_auth_cap == cap) { - WARN_ON_ONCE(!list_empty(&ci->i_dirty_item)); + WARN_ON_ONCE(!list_empty(&ci->i_dirty_item) && + !mdsc->fsc->blocklisted); ci->i_auth_cap = NULL; }