From db8ea0afe3c16b92fecc5f46fa9a0785d162270a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 31 May 2013 00:46:01 +0200 Subject: [PATCH] shadow_copy2: use stored mount_point instead of recalculating. In the case of snapdirseverywhere but NOT crossmountpoints. This spares stat calls. And is the only correct thing to do if the mount point was specified in the configuration. Signed-off-by: Michael Adam Reviewed-by: Andrew Bartlett (cherry picked from commit 6ccbc1347d3240fc3c874a1957b654456fb6234c) --- source3/modules/vfs_shadow_copy2.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 950f2908465..ebc50e9076e 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -577,15 +577,7 @@ static char *shadow_copy2_convert(TALLOC_CTX *mem_ctx, min_offset = 0; if (!config->crossmountpoints) { - char *mount_point; - - mount_point = shadow_copy2_find_mount_point(talloc_tos(), - handle); - if (mount_point == NULL) { - goto fail; - } - min_offset = strlen(mount_point); - TALLOC_FREE(mount_point); + min_offset = strlen(config->mount_point); } memcpy(converted, path, pathlen+1); -- 2.11.4.GIT