From 80b15d6e39f668e12aa401cc3a98e32e07965e09 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 18 Jul 2024 09:08:24 +0200 Subject: [PATCH] repair: use libxfs_trans_get_buf in fill_rtino The buffer gets entirely rewritten, no need to read it from disk. Also pass 0 instead of 1 for the flags, which doesn't change a thing given that the flags are entirely ignored in userspace, but it looks less weird now. Signed-off-by: Christoph Hellwig --- repair/rt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repair/rt.c b/repair/rt.c index d29875cd0..2c93b6d64 100644 --- a/repair/rt.c +++ b/repair/rt.c @@ -372,10 +372,9 @@ fill_rtino( ASSERT(map.br_startblock != HOLESTARTBLOCK); - error = -libxfs_trans_read_buf(mp, tp, mp->m_dev, + error = -libxfs_trans_get_buf(tp, mp->m_dev, XFS_FSB_TO_DADDR(mp, map.br_startblock), - XFS_FSB_TO_BB(mp, 1), 1, &bp, NULL); - + XFS_FSB_TO_BB(mp, 1), 0, &bp); if (error) { do_warn( _("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime %s inode %" PRIu64 "\n"), -- 2.50.1