diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-30 15:44:52 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-22 21:35:02 -0800 |
commit | df7f080a42a06b4775b633a6288c3233442af00a (patch) | |
tree | 1f9b6af2afdfb838be83911a5f0893830f6d4a49 /fs/xfs/scrub/symlink.c | |
parent | 3a637c008b0083ffa252a4114e5d740bd687d296 (diff) |
xfs: repair damaged symlinksrepair-inodes_2019-11-22
Repair inconsistent symbolic link data.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/symlink.c')
-rw-r--r-- | fs/xfs/scrub/symlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/symlink.c b/fs/xfs/scrub/symlink.c index 5641ae512c9e..1709c2d90752 100644 --- a/fs/xfs/scrub/symlink.c +++ b/fs/xfs/scrub/symlink.c @@ -21,12 +21,15 @@ xchk_setup_symlink( struct xfs_scrub *sc, struct xfs_inode *ip) { + uint resblks; + /* Allocate the buffer without the inode lock held. */ sc->buf = kmem_zalloc_large(XFS_SYMLINK_MAXLEN + 1, 0); if (!sc->buf) return -ENOMEM; - return xchk_setup_inode_contents(sc, ip, 0); + resblks = xfs_symlink_blocks(sc->mp, XFS_SYMLINK_MAXLEN); + return xchk_setup_inode_contents(sc, ip, resblks); } /* Symbolic links. */ |