From 1c092c5ba6c812e05b63b633c8e9bf0f5ac3deb3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 Dec 2004 03:19:27 +0000 Subject: r4406: - don't call the xattr unlink hook on unlink unless the link count is 1, otherwise the xattrs of the remaining link are removed - fix the handling of attribute set on directories (This used to be commit fa44e3cce00b75656c85378c7825960540d2f282) --- source4/ntvfs/posix/pvfs_unlink.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/posix/pvfs_unlink.c') 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 */ -- cgit