Skip to content

Commit

Permalink
Allow symlinks to non-existing-directories to work
Browse files Browse the repository at this point in the history
As a directory, with XATTR for reparse-point would
have zsize > 2, we need to use the zap count instead.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Sep 13, 2024
1 parent 434733f commit 2a63b77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions module/os/windows/spl/spl-vnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ vnode_ischr(vnode_t *vp)
int
vnode_isswap(vnode_t *vp)
{
return (0);
return (vp->v_type == VFIFO);
}

int
Expand All @@ -950,7 +950,7 @@ vnode_isfifo(vnode_t *vp)
int
vnode_islnk(vnode_t *vp)
{
return (0);
return (vp->v_type == VLNK);
}

mount_t *
Expand Down
2 changes: 1 addition & 1 deletion module/os/windows/zfs/zfs_vnops_windows_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3227,7 +3227,7 @@ zfs_setunlink(FILE_OBJECT *fo, vnode_t *dvp)
// are not empty.
if (S_ISDIR(zp->z_mode)) {

if (zp->z_size > 2) {
if (!zfs_dirempty(zp)) {
Status = STATUS_DIRECTORY_NOT_EMPTY;
goto out_unlock;
}
Expand Down

0 comments on commit 2a63b77

Please sign in to comment.