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 <aspandey@redhat.com>
This commit is contained in:
Ashish Pandey 2018-09-06 16:15:01 +05:30 committed by Amar Tumballi
parent 5537a8f050
commit ee79077c0d

View File

@ -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");