summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-05-31 00:46:01 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-05 09:21:33 +1300
commit6ccbc1347d3240fc3c874a1957b654456fb6234c (patch)
treeab4260e067462f2782ab45aaeb0ab5775b04cdb0 /source3/modules
parent935120dbc01890e313e2902b13141d4a13fe96d5 (diff)
downloadsamba-6ccbc1347d3240fc3c874a1957b654456fb6234c.tar.gz
samba-6ccbc1347d3240fc3c874a1957b654456fb6234c.tar.bz2
samba-6ccbc1347d3240fc3c874a1957b654456fb6234c.zip
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 <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_shadow_copy2.c10
1 files changed, 1 insertions, 9 deletions
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);