From 87ef6a23dee165b00418a36ad5473f4427928e49 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Mon, 25 Nov 2019 17:39:07 +0200 Subject: 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 --- glusterfsd/src/glusterfsd.c | 9 --------- 1 file changed, 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); -- cgit