]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - repair/dir2.c
xfs_repair: set *parent if process_dir2_data() fixes root inode
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)
commitaedcecb505e99674f2168676e5f2942284085641
treeb98fdd002226f9aa168648d175eb173d9add5686
parent1f60de2849e6b383739ffd098f8a5d1def315ce6
xfs_repair: set *parent if process_dir2_data() fixes root inode

process_dir2_data() may fix the root dir's parent inode:

"bad .. entry in root directory inode 6912, was 7159: correcting"

But we don't update the *parent passed in in that case; this then leads to
an assert later in process_dir2:

xfs_repair: dir2.c:2039: process_dir2:
  Assertion `(ino != mp->m_sb.sb_rootino && ino != *parent) ||
  (ino == mp->m_sb.sb_rootino && (ino == *parent || need_root_dotdot == 1))'
  failed.

Updating the value of *parent when we fix the parent value resolves this
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/dir2.c