diff options
Diffstat (limited to 'xlators/storage')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 0cd6883c1b3..d9f27e33054 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4375,7 +4375,9 @@ init (xlator_t *this) /* Check for Extended attribute support, if not present, log it */ op_ret = sys_lsetxattr (dir_data->data, "trusted.glusterfs.test", "working", 8, 0); - if (op_ret < 0) { + if (op_ret == 0) { + sys_lremovexattr (dir_data->data, "trusted.glusterfs.test"); + } else { tmp_data = dict_get (this->options, "mandate-attribute"); if (tmp_data) { @@ -4551,7 +4553,6 @@ fini (xlator_t *this) if (!priv) return; this->private = NULL; - sys_lremovexattr (priv->base_path, "trusted.glusterfs.test"); GF_FREE (priv); return; } |