Skip to content

Commit 6f46697

Browse files
author
Darrick J. Wong
committed
xfs: set XFS_SICK_INO_SYMLINK_ZAPPED explicitly when zapping a symlink
If we need to reset a symlink target to the "durr it's busted" string, then we clear the zapped flag as well. However, this should be using the provided helper so that we don't set the zapped state on an otherwise ok symlink. Cc: <stable@vger.kernel.org> # v6.10 Fixes: 2651923 ("xfs: online repair of symbolic links") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent aa7bfb5 commit 6f46697

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/xfs/scrub/symlink_repair.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "scrub/tempfile.h"
3737
#include "scrub/tempexch.h"
3838
#include "scrub/reap.h"
39+
#include "scrub/health.h"
3940

4041
/*
4142
* Symbolic Link Repair
@@ -233,7 +234,7 @@ xrep_symlink_salvage(
233234
* target zapped flag.
234235
*/
235236
if (buflen == 0) {
236-
sc->sick_mask |= XFS_SICK_INO_SYMLINK_ZAPPED;
237+
xchk_mark_healthy_if_clean(sc, XFS_SICK_INO_SYMLINK_ZAPPED);
237238
sprintf(target_buf, DUMMY_TARGET);
238239
}
239240

0 commit comments

Comments
 (0)