diff options
Diffstat (limited to 'fs/xfs/scrub/nlinks.c')
-rw-r--r-- | fs/xfs/scrub/nlinks.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/scrub/nlinks.c b/fs/xfs/scrub/nlinks.c index 356b2fcf6768..428e5a9f6347 100644 --- a/fs/xfs/scrub/nlinks.c +++ b/fs/xfs/scrub/nlinks.c @@ -53,15 +53,16 @@ int xchk_setup_nlinks( struct xfs_scrub *sc) { + unsigned int buf_bytes = sizeof(struct xchk_nlink_ctrs); int error; if (xchk_could_repair(sc)) { - error = xrep_setup_nlinks(sc); + error = xrep_setup_nlinks(sc, &buf_bytes); if (error) return error; } - sc->buf = kmem_zalloc(sizeof(struct xchk_nlink_ctrs), - KM_NOFS | KM_MAYFAIL); + + sc->buf = kmem_zalloc(buf_bytes, KM_NOFS | KM_MAYFAIL); if (!sc->buf) return -ENOMEM; |