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 599ee277bba2..37d60a52f67a 100644
--- a/fs/xfs/scrub/symlink.c
+++ b/fs/xfs/scrub/symlink.c
@@ -20,12 +20,15 @@ int
xchk_setup_symlink(
struct xfs_scrub *sc)
{
+ uint resblks;
+
/* Allocate the buffer without the inode lock held. */
sc->buf = kvzalloc(XFS_SYMLINK_MAXLEN + 1, GFP_KERNEL);
if (!sc->buf)
return -ENOMEM;
- return xchk_setup_inode_contents(sc, 0);
+ resblks = xfs_symlink_blocks(sc->mp, XFS_SYMLINK_MAXLEN);
+ return xchk_setup_inode_contents(sc, resblks);
}
/* Symbolic links. */