From eb39aa4695dbda4ed32aa0b907b501fcf1a7ef01 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 8 Feb 2017 17:51:32 +0100 Subject: [PATCH] vfs_ceph: replace deprecated ceph_shutdown() call MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ceph_shutdown() is the equivalent to ceph_unmount() + ceph_release() without error handling. Signed-off-by: David Disseldorp Reviewed-by: Ralph Böhme --- source3/modules/vfs_ceph.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 1cd364269b5..5cdb3723673 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -149,6 +149,8 @@ err_out: static void cephwrap_disconnect(struct vfs_handle_struct *handle) { + int ret; + if (!cmount) { DBG_ERR("[CEPH] Error, ceph not mounted\n"); return; @@ -160,7 +162,15 @@ static void cephwrap_disconnect(struct vfs_handle_struct *handle) return; } - ceph_shutdown(cmount); + ret = ceph_unmount(cmount); + if (ret < 0) { + DBG_ERR("[CEPH] failed to unmount: %s\n", strerror(-ret)); + } + + ret = ceph_release(cmount); + if (ret < 0) { + DBG_ERR("[CEPH] failed to release: %s\n", strerror(-ret)); + } cmount = NULL; /* Make it safe */ } -- 2.11.4.GIT