From da735ad9b58b76d27c580a9feb63f14b2cc0669d Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Mon, 25 Nov 2019 15:45:27 +0200 Subject: store.c: remove a sys_stat() call - just open the file I don't see the value on performing a sys_stat() on a path instead of just trying to open the file. Change-Id: Ib3f88d8c45aea091eafea17c4be02e2acdb713f1 updates: bz#1193929 Signed-off-by: Yaniv Kaul --- libglusterfs/src/store.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c index f444741ef0c..fe4401d0355 100644 --- a/libglusterfs/src/store.c +++ b/libglusterfs/src/store.c @@ -453,18 +453,9 @@ int gf_store_handle_retrieve(char *path, gf_store_handle_t **handle) { int32_t ret = -1; - struct stat statbuf = {0}; - ret = sys_stat(path, &statbuf); - if (ret) { - gf_msg("", GF_LOG_ERROR, errno, LG_MSG_PATH_NOT_FOUND, - "Path " - "corresponding to %s.", - path); - goto out; - } ret = gf_store_handle_new(path, handle); -out: + gf_msg_debug("", 0, "Returning %d", ret); return ret; } -- cgit