]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
repair: use libxfs_trans_get_buf in fill_rtino
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Jul 2024 07:08:24 +0000 (09:08 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 18 Jul 2024 13:22:49 +0000 (15:22 +0200)
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 <hch@lst.de>
repair/rt.c

index d29875cd04bffeb3f507fd8a0198a483fc74b856..2c93b6d643b7649ff9469c2a8f328da391fd0978 100644 (file)
@@ -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"),