diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 58453e3255f8802fa0050ac034546e88a3ad4cca..02718638dc12232cbb76d66ce3c16a2f1277c958 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1237,6 +1237,12 @@ xfs_fs_remount( /* ro -> rw */ if ((mp->m_flags & XFS_MOUNT_RDONLY) && !(*flags & MS_RDONLY)) { + if (mp->m_flags & XFS_MOUNT_NORECOVERY) { + xfs_warn(mp, + "ro->rw transition prohibited on norecovery mount"); + return -EINVAL; + } + mp->m_flags &= ~XFS_MOUNT_RDONLY; /*