diff options
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 4f4d20b2721c..d170fffd7402 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -486,7 +486,7 @@ xfs_log_mount(xfs_mount_t *mp, | |||
486 | cmn_err(CE_NOTE, | 486 | cmn_err(CE_NOTE, |
487 | "!Mounting filesystem \"%s\" in no-recovery mode. Filesystem will be inconsistent.", | 487 | "!Mounting filesystem \"%s\" in no-recovery mode. Filesystem will be inconsistent.", |
488 | mp->m_fsname); | 488 | mp->m_fsname); |
489 | ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); | 489 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); |
490 | } | 490 | } |
491 | 491 | ||
492 | mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); | 492 | mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); |
@@ -496,16 +496,15 @@ xfs_log_mount(xfs_mount_t *mp, | |||
496 | * just worked. | 496 | * just worked. |
497 | */ | 497 | */ |
498 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { | 498 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { |
499 | bhv_vfs_t *vfsp = XFS_MTOVFS(mp); | 499 | int error, readonly = (mp->m_flags & XFS_MOUNT_RDONLY); |
500 | int error, readonly = (vfsp->vfs_flag & VFS_RDONLY); | ||
501 | 500 | ||
502 | if (readonly) | 501 | if (readonly) |
503 | vfsp->vfs_flag &= ~VFS_RDONLY; | 502 | mp->m_flags &= ~XFS_MOUNT_RDONLY; |
504 | 503 | ||
505 | error = xlog_recover(mp->m_log); | 504 | error = xlog_recover(mp->m_log); |
506 | 505 | ||
507 | if (readonly) | 506 | if (readonly) |
508 | vfsp->vfs_flag |= VFS_RDONLY; | 507 | mp->m_flags |= XFS_MOUNT_RDONLY; |
509 | if (error) { | 508 | if (error) { |
510 | cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); | 509 | cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); |
511 | xlog_dealloc_log(mp->m_log); | 510 | xlog_dealloc_log(mp->m_log); |
@@ -537,7 +536,7 @@ xfs_log_mount_finish(xfs_mount_t *mp, int mfsi_flags) | |||
537 | error = xlog_recover_finish(mp->m_log, mfsi_flags); | 536 | error = xlog_recover_finish(mp->m_log, mfsi_flags); |
538 | else { | 537 | else { |
539 | error = 0; | 538 | error = 0; |
540 | ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); | 539 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); |
541 | } | 540 | } |
542 | 541 | ||
543 | return error; | 542 | return error; |
@@ -597,7 +596,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
597 | * Don't write out unmount record on read-only mounts. | 596 | * Don't write out unmount record on read-only mounts. |
598 | * Or, if we are doing a forced umount (typically because of IO errors). | 597 | * Or, if we are doing a forced umount (typically because of IO errors). |
599 | */ | 598 | */ |
600 | if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) | 599 | if (mp->m_flags & XFS_MOUNT_RDONLY) |
601 | return 0; | 600 | return 0; |
602 | 601 | ||
603 | xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); | 602 | xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); |