diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-07-26 22:26:37 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-08-03 10:20:43 +0200 |
| commit | af146cb7ff8ff5c54162f35c238f3ff1d5ad110f (patch) | |
| tree | 829f48c9ad0fbda8362b593e83ffbadc7cfbe2db | |
| parent | 6d67c6b99f1fc07c64b97fcbc974c6f1ada7f622 (diff) | |
| download | linux-af146cb7ff8ff5c54162f35c238f3ff1d5ad110f.tar.gz linux-af146cb7ff8ff5c54162f35c238f3ff1d5ad110f.zip | |
xfs: set the prev pointer when reinserting an inode on the unlinked list
If we find a rogue free inode and decide to reinsert it into the
unlinked list, we need to set the prev pointer to NULLAGINO so that the
incore list gets updated.
Cc: stable@vger.kernel.org # v6.10
Fixes: ab97f4b1c03075 ("xfs: repair AGI unlinked inode bucket lists")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
| -rw-r--r-- | fs/xfs/scrub/agheader_repair.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 65b9a8befce9..4f1f235349c5 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -1504,6 +1504,10 @@ xrep_iunlink_add_to_bucket( if (error) return error; + error = xrep_iunlink_store_prev(ragi, agino, NULLAGINO); + if (error) + return error; + /* Remember the head inode's previous pointer. */ if (current_head != NULLAGINO) { error = xrep_iunlink_store_prev(ragi, current_head, agino); |
