summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-11-25 17:39:07 +0200
committerAmar Tumballi <amarts@gmail.com>2019-11-27 07:21:10 +0000
commit87ef6a23dee165b00418a36ad5473f4427928e49 (patch)
tree33dd69307d2764a7993e574102b8fe2bcb5ec082
parentd97f78467849eef92559217b48d2158521cbba5f (diff)
glusterfsd.c: remove sys_lstat() call
get_volfp() in glfs.c doesn't use it, so get_volfp() in glusterfsd.c can just open the file without the stat call as well, IMHO. Change-Id: I3cb5bf12a09b5be42aa2ee4f432f8d351eee5b9e updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
-rw-r--r--glusterfsd/src/glusterfsd.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index ff1d90880ec..b787eca8d31 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -813,20 +813,11 @@ err:
static FILE *
get_volfp(glusterfs_ctx_t *ctx)
{
- int ret = 0;
cmd_args_t *cmd_args = NULL;
FILE *specfp = NULL;
- struct stat statbuf;
cmd_args = &ctx->cmd_args;
- ret = sys_lstat(cmd_args->volfile, &statbuf);
- if (ret == -1) {
- gf_msg("glusterfsd", GF_LOG_ERROR, errno, glusterfsd_msg_9,
- "loading volume file %s failed", cmd_args->volfile);
- return NULL;
- }
-
if ((specfp = fopen(cmd_args->volfile, "r")) == NULL) {
gf_msg("glusterfsd", GF_LOG_ERROR, errno, glusterfsd_msg_9,
"loading volume file %s failed", cmd_args->volfile);