[PATCH 6/5] xfs_repair: don't re-add root dotdot if root dir was rebuilt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we've rebuilt the root directory, ".." was taken
care of, so clear need_root_dotdot.

Otherwise it will be added twice, and a subsequent repair
will say:

 entry ".." (ino 5824) in dir 5824 is a duplicate name, would junk entry

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

(sorry for 6/5, this just popped out and is similar to the
patch 3/5 I just sent, so probably worth doing at the same time.

diff --git a/repair/phase6.c b/repair/phase6.c
index cc36a9c..2e67c60 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -2294,6 +2297,9 @@ out_fix:
 		 */
 		if (*need_dot)
 			add_inode_ref(irec, ino_offset);
+		/* If we rebuilt the root dir, dot dot is in good shape */
+		if (ino == mp->m_sb.sb_rootino)
+			need_root_dotdot = 0;
 		*num_illegal = 0;
 		*need_dot = 0;
 	} else {

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux