From ee79077c0d19ddf97caea22cc001b6f4f9b0829c Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Thu, 6 Sep 2018 16:15:01 +0530 Subject: storage/posix: Fix coverity issue - Unchecked return value Fixes CID: 1388886 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85287446&defectInstanceId=25997291&mergedDefectId=1388886 Change-Id: Ic4e558bba7e15d213c07bc31affb2e175ace5502 updates: bz#789278 Signed-off-by: Ashish Pandey --- xlators/storage/posix/src/posix-common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c index cc9c9ca5c8f..24e990cafe2 100644 --- a/xlators/storage/posix/src/posix-common.c +++ b/xlators/storage/posix/src/posix-common.c @@ -599,7 +599,14 @@ posix_init (xlator_t *this) op_ret = sys_lsetxattr (dir_data->data, "trusted.glusterfs.test", "working", 8, 0); if (op_ret != -1) { - sys_lremovexattr (dir_data->data, "trusted.glusterfs.test"); + ret = sys_lremovexattr (dir_data->data, + "trusted.glusterfs.test"); + if (ret) { + gf_msg (this->name, GF_LOG_DEBUG, errno, + P_MSG_INVALID_OPTION, + "failed to remove xattr: " + "trusted.glusterfs.test"); + } } else { tmp_data = dict_get (this->options, "mandate-attribute"); -- cgit