Module Name:    src
Committed By:   riastradh
Date:           Thu Apr  9 05:02:28 UTC 2015

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_dir.c
        src/tests/fs/vfs: t_vnops.c

Log Message:
Fix return code of rmdir(nonempty) in zfs: ENOTEMPTY, not EEXIST.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c
cvs rdiff -u -r1.45 -r1.46 src/tests/fs/vfs/t_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c:1.9 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c:1.10
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c:1.9	Thu Oct 18 14:29:44 2012
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c	Thu Apr  9 05:02:28 2015
@@ -801,7 +801,7 @@ zfs_link_destroy(zfs_dirlock_t *dl, znod
 		if (zp_is_dir && !zfs_dirempty(zp)) {	/* dir not empty */
 			mutex_exit(&zp->z_lock);
 			vn_vfsunlock(vp);
-			return (EEXIST);
+			return (ENOTEMPTY);
 		}
 		if (zp->z_phys->zp_links <= zp_is_dir) {
 			zfs_panic_recover("zfs: link count on vnode %p is %u, "

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.45 src/tests/fs/vfs/t_vnops.c:1.46
--- src/tests/fs/vfs/t_vnops.c:1.45	Tue Mar 24 23:24:55 2015
+++ src/tests/fs/vfs/t_vnops.c	Thu Apr  9 05:02:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.45 2015/03/24 23:24:55 riastradh Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.46 2015/04/09 05:02:28 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -179,8 +179,6 @@ dir_notempty(const atf_tc_t *tc, const c
 	rump_sys_close(fd);
 
 	rv = rump_sys_rmdir(pb);
-	if (FSTYPE_ZFS(tc))
-		atf_tc_expect_fail("PR kern/47656: Test known to be broken");
 	if (rv != -1 || errno != ENOTEMPTY)
 		atf_tc_fail("non-empty directory removed succesfully");
 

Reply via email to