diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 12d94f2d6ad6..a2bc650b237a 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -3320,6 +3320,13 @@ void ceph_inode_shutdown(struct inode *inode) } spin_unlock(&ci->i_ceph_lock); + /* + * The caps are gone now, so wake up anyone waiting for them -- they + * are never coming back and the waiters need to notice the shutdown + * instead. remove_session_caps_cb() does the same after purging. + */ + wake_up_all(&ci->i_cap_wq); + if (invalidate) ceph_queue_invalidate(inode); while (iputs--)