summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_unlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_unlink.c')
-rw-r--r--source4/ntvfs/posix/pvfs_unlink.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c
index 09732d7735..5f8a828f15 100644
--- a/source4/ntvfs/posix/pvfs_unlink.c
+++ b/source4/ntvfs/posix/pvfs_unlink.c
@@ -89,9 +89,11 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
return NT_STATUS_FILE_IS_A_DIRECTORY;
}
- status = pvfs_xattr_unlink_hook(pvfs, name->full_name);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
+ if (name->st.st_nlink == 1) {
+ status = pvfs_xattr_unlink_hook(pvfs, name->full_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
}
/* finally try the actual unlink */