summaryrefslogtreecommitdiffstats
path: root/fs/ceph/metric.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-06-09 14:09:52 -0400
committerIlya Dryomov <idryomov@gmail.com>2021-06-29 00:15:52 +0200
commit7e65624d32b6e0429b1d3559e5585657f34f74a1 (patch)
tree65f0d6eb81fd2e14e9e1e7311dd82db4a04b0421 /fs/ceph/metric.c
parentdf2c0cb7f8e8c83e495260ad86df8c5da947f2a7 (diff)
downloadlinux-7e65624d32b6e0429b1d3559e5585657f34f74a1.tar.gz
linux-7e65624d32b6e0429b1d3559e5585657f34f74a1.tar.bz2
linux-7e65624d32b6e0429b1d3559e5585657f34f74a1.zip
ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
...to simplify some error paths. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Luis Henriques <lhenriques@suse.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/metric.c')
-rw-r--r--fs/ceph/metric.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
index 9577c71e645d..5ac151eb0d49 100644
--- a/fs/ceph/metric.c
+++ b/fs/ceph/metric.c
@@ -311,8 +311,7 @@ void ceph_metric_destroy(struct ceph_client_metric *m)
cancel_delayed_work_sync(&m->delayed_work);
- if (m->session)
- ceph_put_mds_session(m->session);
+ ceph_put_mds_session(m->session);
}
#define METRIC_UPDATE_MIN_MAX(min, max, new) \