summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-02 08:59:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-02 08:59:33 +0300
commitb004c046df92c429202e899f3f117814a5eb02d3 (patch)
tree1ac2b86f3a22d67776025c40840f522e269558e3 /fs/xfs/xfs_super.c
parentc04005ef3576893e2db315d9ea2cfa4cf88b2c05 (diff)
parentc72e4daa7ab2814e402f2b67dd1681ea4db446af (diff)
downloadlinux-rolling-lts.tar.xz
Merge v6.12.26linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 8f7c9eaeb360..201a86b3574d 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1619,8 +1619,12 @@ xfs_fs_fill_super(
#endif
}
- /* Filesystem claims it needs repair, so refuse the mount. */
- if (xfs_has_needsrepair(mp)) {
+ /*
+ * Filesystem claims it needs repair, so refuse the mount unless
+ * norecovery is also specified, in which case the filesystem can
+ * be mounted with no risk of further damage.
+ */
+ if (xfs_has_needsrepair(mp) && !xfs_has_norecovery(mp)) {
xfs_warn(mp, "Filesystem needs repair. Please run xfs_repair.");
error = -EFSCORRUPTED;
goto out_free_sb;