From 6dd0282fbfa14eb5a6ae3df1083ef1eea443ea20 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 27 Apr 2011 04:46:24 +0000 Subject: posix: glusterfs.test should be removed xattr immediately after use. Signed-off-by: Krishnan Parthasarathi Signed-off-by: Anand Avati BUG: 2609 (Error message not properly provided when trying to create a volume from a read-only source) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2609 --- xlators/storage/posix/src/posix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 0cd6883c1..d9f27e330 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; } -- cgit