diff options
author | vmallika <vmallika@redhat.com> | 2015-11-02 15:39:46 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-11-09 03:12:55 -0800 |
commit | 9380b1d1fb74cd73d306a1a501e4b7b982c1a76e (patch) | |
tree | b2f0dbc733a166ff9e7ec548bfa59aff9321305d /xlators/storage/posix/src/posix-helpers.c | |
parent | 87c877c93c399863b6afcc642d015627217b79f8 (diff) |
marker: do remove xattr only for last link
This is a backport of http://review.gluster.org/#/c/12033/
With unlink, rename, rmdir, contribution xattrs
are removed. If the file is a last link
then remove_xattr will fail with ENOENT.
So it better to perform remove_xattr
only if there are more links to the file
> Change-Id: Ifc1e7fda4d310fd87f6f28a635c9ea78b8f3929d
> BUG: 1257694
> Signed-off-by: vmallika <vmallika@redhat.com>
Change-Id: Icf5fdd86bbb8eef0adeb9518e89e5b612e9e0705
BUG: 1279331
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/12549
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index ec6075a8dfd..b6f3bf6686b 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -479,9 +479,9 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data, } else if (fnmatch (marker_contri_key, key, 0) == 0) { ret = _posix_get_marker_quota_contributions (filler, key); - } else if (strcmp(key, CTR_REQUEST_LINK_COUNT_XDATA) == 0) { + } else if (strcmp(key, GF_REQUEST_LINK_COUNT_XDATA) == 0) { ret = dict_set (filler->xattr, - CTR_REQUEST_LINK_COUNT_XDATA, data); + GF_REQUEST_LINK_COUNT_XDATA, data); } else { ret = _posix_xattr_get_set_from_backend (filler, key); } |