marker: do remove xattr only for last link
authorvmallika <vmallika@redhat.com>
Mon, 2 Nov 2015 10:09:46 +0000 (15:39 +0530)
committerRaghavendra G <rgowdapp@redhat.com>
Mon, 9 Nov 2015 11:12:26 +0000 (03:12 -0800)
commit2794cb71b96c44033dcd01102039c038956cf7b5
tree0dc5459474f4e07ba0e75a81b79b0ae99db850bb
parentc8c9308134ae4ce24c630a1b0ccfcf4e8f9b0fe7
marker: do remove xattr only for last link

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>
Reviewed-on: http://review.gluster.org/12033
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
libglusterfs/src/glusterfs.h
xlators/features/changetimerecorder/src/changetimerecorder.c
xlators/features/marker/src/marker-quota.c
xlators/features/marker/src/marker-quota.h
xlators/features/marker/src/marker.c
xlators/features/marker/src/marker.h
xlators/features/trash/src/trash.c
xlators/storage/posix/src/posix-helpers.c
xlators/storage/posix/src/posix.c