From: David Disseldorp Date: Wed, 8 Feb 2017 16:51:32 +0000 (+0100) Subject: vfs_ceph: replace deprecated ceph_shutdown() call X-Git-Tag: talloc-2.1.9~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb39aa4695dbda4ed32aa0b907b501fcf1a7ef01;p=thirdparty%2Fsamba.git vfs_ceph: replace deprecated ceph_shutdown() call ceph_shutdown() is the equivalent to ceph_unmount() + ceph_release() without error handling. Signed-off-by: David Disseldorp Reviewed-by: Ralph Böhme --- 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 */ }