mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
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: ab97f4b1c0 ("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>
This commit is contained in:
committed by
Carlos Maiolino
parent
6d67c6b99f
commit
af146cb7ff
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user