summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-11-25 15:45:27 +0200
committerAmar Tumballi <amarts@gmail.com>2019-12-20 06:23:16 +0000
commitda735ad9b58b76d27c580a9feb63f14b2cc0669d (patch)
tree5075f50026ce2f91c514bf6f963bf4242a33da26
parent82ba1cb8ec8cdbc02ad69a2ab4c6cf569503ab34 (diff)
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 <ykaul@redhat.com>
-rw-r--r--libglusterfs/src/store.c11
1 files changed, 1 insertions, 10 deletions
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;
}