Module Name:    src
Committed By:   reinoud
Date:           Thu Jul 11 19:41:19 UTC 2013

Modified Files:
        src/sys/fs/udf: udf_rename.c

Log Message:
Resort to the easiest way to check if a directory is deleted: the flag that
tells that there is no FID (dirent) pointing to it anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/udf/udf_rename.c

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

Modified files:

Index: src/sys/fs/udf/udf_rename.c
diff -u src/sys/fs/udf/udf_rename.c:1.3 src/sys/fs/udf/udf_rename.c:1.4
--- src/sys/fs/udf/udf_rename.c:1.3	Thu Jul 11 15:43:12 2013
+++ src/sys/fs/udf/udf_rename.c	Thu Jul 11 19:41:19 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_rename.c,v 1.3 2013/07/11 15:43:12 reinoud Exp $ */
+/* $NetBSD: udf_rename.c,v 1.4 2013/07/11 19:41:19 reinoud Exp $ */
 
 /*
  * Copyright (c) 2013 Reinoud Zandijk
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.3 2013/07/11 15:43:12 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.4 2013/07/11 19:41:19 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -480,23 +480,13 @@ udf_gro_lookup(struct mount *mp, struct 
 static bool
 udf_rmdired_p(struct vnode *vp)
 {
-	struct long_ad icb_loc;
-	const char *name;
-	int namelen;
-	int error, found;
-
 	DPRINTF(CALL, ("udf_rmdired_p called\n"));
 
 	KASSERT(vp != NULL);
 	KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
 	KASSERT(vp->v_type == VDIR);
 
-	/* get our node */
-	name    = "..";
-	namelen = 2;
-	error = udf_lookup_name_in_dir(vp, name, namelen,
-			&icb_loc, &found);
-	return (error || !found);
+	return (VTOI(vp)->i_flags & IN_DELETED);
 }
 
 

Reply via email to