]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_repair: clear need_root_dotdot if we rebuild the root dir
authorEric Sandeen <sandeen@redhat.com>
Tue, 7 Apr 2015 00:04:11 +0000 (10:04 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 7 Apr 2015 00:04:11 +0000 (10:04 +1000)
It's possible to enter longform_dir2_rebuild with need_root_dotdot
set; rebuilding it will add "..", and if need_root_dotdot stays set,
we'll add another ".." entry, causing a second repair to find and
fix that problem.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/phase6.c

index 0ec4f07ca1c25c4dee3a15b05dab4e20386dbb15..17286095ed19dbd3824d21ad0b562e36516e9fd1 100644 (file)
@@ -1354,6 +1354,9 @@ longform_dir2_rebuild(
 
        libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
 
+       if (ino == mp->m_sb.sb_rootino)
+               need_root_dotdot = 0;
+
        /* go through the hash list and re-add the inodes */
 
        for (p = hashtab->first; p; p = p->nextbyorder) {