Skip to contentSkip to conversation

xfsprogs: initialize filetype for xfs_name_dot

PATCH In review Eric Sandeen 3 participants 3 messages Sep 17, 2013 – Oct 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsprogs: initialize filetype for xfs_name_dot

If we add the '.' entry in repair, make sure it has a file type initialized.

---

repair/phase6.c +3 -1
index a4ad7a3..580dbf7 100644
@@ -34,7 +34,9 @@ static struct cred		zerocr;
 static struct fsxattr 		zerofsx;
 static xfs_ino_t		orphanage_ino;
 
-static struct xfs_name		xfs_name_dot = {(unsigned char *)".", 1};
+static struct xfs_name		xfs_name_dot = {(unsigned char *)".",
+						1,
+						XFS_DIR3_FT_DIR};
 
 /*
  * Data structures used to keep track of directories where the ".."

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Eric Sandeen

If we add the '.' entry in repair, make sure it has a file type initialized.

---

This looks good.

looks like shared code xfs_dir_lookup() returns the ci match in a xfs_name without a file type. Not used now, but may be handy.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs