From: Ilya Dryomov Date: Mon, 16 Oct 2017 08:32:50 +0000 (+0200) Subject: ceph: -EINVAL on decoding failure in ceph_mdsc_handle_fsmap() X-Git-Tag: rel_imx_4.19.35_1.1.0~11213^2~11 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=76bd6ec4988065d39983ba8e93bb738313f68050;p=linux.git ceph: -EINVAL on decoding failure in ceph_mdsc_handle_fsmap() Don't set ->mdsmap_err to -ENOENT unconditionally, and drop unneeded return statement while at it. Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 8c8361262ade..b76506be4228 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -3879,14 +3879,14 @@ void ceph_mdsc_handle_fsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg) goto err_out; } return; + bad: pr_err("error decoding fsmap\n"); err_out: mutex_lock(&mdsc->mutex); - mdsc->mdsmap_err = -ENOENT; + mdsc->mdsmap_err = err; __wake_requests(mdsc, &mdsc->waiting_for_map); mutex_unlock(&mdsc->mutex); - return; } /*