From: Eric Sandeen Date: Tue, 7 Apr 2015 00:04:11 +0000 (+1000) Subject: xfs_repair: clear need_root_dotdot if we rebuild the root dir X-Git-Tag: v3.2.3-rc1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f60de2849e6b383739ffd098f8a5d1def315ce6;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: clear need_root_dotdot if we rebuild the root dir 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 Reviewed-by: Carlos Maiolino Signed-off-by: Dave Chinner --- diff --git a/repair/phase6.c b/repair/phase6.c index 0ec4f07ca..17286095e 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -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) {