ceph: remove the capsnaps when removing caps
authorXiubo Li <xiubli@redhat.com>
Wed, 25 Aug 2021 13:45:43 +0000 (21:45 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 2 Sep 2021 20:49:17 +0000 (22:49 +0200)
commita6d37ccdd240e80f26aaea0e62cda310e0e184d7
treef3207e33f07507894073adae7227fb2aa97bf776
parentb11ed50346683a749632ea664959b28d524d7395
ceph: remove the capsnaps when removing caps

capsnaps will take inode references via ihold when queueing to flush.
When force unmounting, the client will just close the sessions and
may never get a flush reply, causing a leak and inode ref leak.

Fix this by removing the capsnaps for an inode when removing the caps.

URL: https://tracker.ceph.com/issues/52295
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c
fs/ceph/mds_client.c
fs/ceph/super.h