ceph_shutdown() is the equivalent to ceph_unmount() + ceph_release()
without error handling.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
static void cephwrap_disconnect(struct vfs_handle_struct *handle)
{
+ int ret;
+
if (!cmount) {
DBG_ERR("[CEPH] Error, ceph not mounted\n");
return;
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 */
}