summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2020-09-25 09:27:09 -0400
committerIlya Dryomov <idryomov@gmail.com>2020-12-14 23:21:46 +0100
commitdc167e38a014e04e4484b969ee05765232249b0d (patch)
tree2a2a82d572652656f07b0b82455e6970bc033895 /fs/ceph
parent2c85ebc57b3e1817b6ce1a6b703928e113a90442 (diff)
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 <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index ded4229c314a..8552d1082b0e 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;
}