summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-metadata.c
diff options
context:
space:
mode:
authorIraj Jamali <ijamali@redhat.com>2019-01-07 15:19:18 +0530
committerAmar Tumballi <amarts@redhat.com>2019-01-21 04:26:37 +0000
commit11aaecccad03d5803dc7be63c3e36af75da8126d (patch)
tree575290a23d4145a0300853a2c55f53b59196ffb0 /xlators/storage/posix/src/posix-metadata.c
parentcd16967a77d04a8d0c5d5c3ab5346ccdd1df89cb (diff)
posix: fix coverity issue
Logically dead code CID: 1398468 Updates: bz#789278 Change-Id: I8713a0c51777eb64e617d00ab72fd1db4994b6ab Signed-off-by: Iraj Jamali <ijamali@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-metadata.c')
-rw-r--r--xlators/storage/posix/src/posix-metadata.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/xlators/storage/posix/src/posix-metadata.c b/xlators/storage/posix/src/posix-metadata.c
index 62669a0..0ea9099 100644
--- a/xlators/storage/posix/src/posix-metadata.c
+++ b/xlators/storage/posix/src/posix-metadata.c
@@ -343,7 +343,6 @@ posix_set_mdata_xattr(xlator_t *this, const char *real_path, int fd,
posix_mdata_t *mdata = NULL;
int ret = -1;
int op_errno = 0;
- bool free_mdata = false;
GF_VALIDATE_OR_GOTO("posix", this, out);
GF_VALIDATE_OR_GOTO(this->name, inode, out);
@@ -372,7 +371,7 @@ posix_set_mdata_xattr(xlator_t *this, const char *real_path, int fd,
* down scenario
*/
__inode_ctx_set1(inode, this, (uint64_t *)&mdata);
- } else if (ret && time) {
+ } else {
/*
* This is the first time creating the time
* attr. This happens when you activate this
@@ -414,8 +413,6 @@ posix_set_mdata_xattr(xlator_t *this, const char *real_path, int fd,
mdata->mtime.tv_nsec = time->tv_nsec;
__inode_ctx_set1(inode, this, (uint64_t *)&mdata);
- } else {
- free_mdata = true;
}
}
@@ -489,8 +486,6 @@ out:
stbuf->ia_atime_nsec = mdata->atime.tv_nsec;
}
- if (free_mdata)
- GF_FREE(mdata);
return ret;
}