recurse_dir(): Move . and .. check earlier

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/filesetup.c b/filesetup.c
index 3bd8633..0f1a340 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -519,9 +519,8 @@
 		char full_path[PATH_MAX];
 		struct stat sb;
 
-		/*
-		 * check d_ino here?
-		 */
+		if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
+			continue;
 
 		sprintf(full_path, "%s/%s", dirname, dir->d_name);
 
@@ -538,9 +537,6 @@
 			continue;
 		}
 
-		if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
-			continue;
-
 		if ((ret = recurse_dir(td, full_path)) != 0)
 			break;
 	}