ceph: fix inode reference leakage in ceph_get_snapdir()
BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit
322794d3355c33adcc4feace0045d85a8e4ed813 ]
The ceph_get_inode() will search for or insert a new inode into the
hash for the given vino, and return a reference to it. If new is
non-NULL, its reference is consumed.
We should release the reference when in error handing cases.
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit
3ae7163598c611a8892698e0c056fe794e52b44b)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>