From 6ccbc1347d3240fc3c874a1957b654456fb6234c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 31 May 2013 00:46:01 +0200 Subject: 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 --- source3/modules/vfs_shadow_copy2.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 950f290846..ebc50e9076 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); -- cgit