ceph: don't take s_mutex or snap_rwsem in ceph_check_caps
authorJeff Layton <jlayton@kernel.org>
Fri, 4 Jun 2021 15:01:25 +0000 (11:01 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 28 Jun 2021 22:15:52 +0000 (00:15 +0200)
commit6a92b08fdad22ae3558faaef561587ebfcb8b901
tree864744c8acda27f9125499d46b8f0eaf1bbb8ea0
parent52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9
ceph: don't take s_mutex or snap_rwsem in ceph_check_caps

These locks appear to be completely unnecessary. Almost all of this
function is done under the inode->i_ceph_lock, aside from the actual
sending of the message. Don't take either lock in this function.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Luis Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c