summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/symlink.c')
-rw-r--r--fs/xfs/scrub/symlink.c5
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. */