diff options
| author | Krishnan Parthasarathi <kp@gluster.com> | 2011-04-27 04:46:24 +0000 | 
|---|---|---|
| committer | Anand Avati <avati@gluster.com> | 2011-05-09 13:26:44 -0700 | 
| commit | 6dd0282fbfa14eb5a6ae3df1083ef1eea443ea20 (patch) | |
| tree | 4f241bfbf11e08ab3bd59aa5cbaf47607e2d149b /xlators | |
| parent | a7ca559bdebfcef9a38dfedb8e4757d42431bf94 (diff) | |
posix: glusterfs.test should be removed xattr immediately after use.
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
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
Diffstat (limited to 'xlators')
| -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;  }  | 
