From: Darrick J. Wong Date: Thu, 12 Apr 2018 05:13:34 +0000 (-0700) Subject: xfs: fix accidental reversion of aa6a6227435cb X-Git-Tag: v4.1.12-124.31.3~860 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a0fbc7aef590a546292a2bbd571f75e0390c4da8;p=users%2Fjedix%2Flinux-maple.git xfs: fix accidental reversion of aa6a6227435cb In commit id 7ea004358b97c ("xfs: don't leave EFIs on AIL on mount failure") I accidentally reverted aa6a6227435cb06c ("xfs: toggle readonly state around xfs_log_mount_finish"), which caused a regression in generic/417. Put back the code that enables iunlink processing on a ro mount. Orabug: 27845869 Signed-off-by: Darrick J. Wong Reviewed-by: Jack Vogel --- diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 40ebfb43f439e..da655552cdd3a 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -748,16 +748,23 @@ xfs_log_mount_finish( struct xfs_mount *mp) { int error = 0; + bool readonly = (mp->m_flags & XFS_MOUNT_RDONLY); if (mp->m_flags & XFS_MOUNT_NORECOVERY) { ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); return 0; + } else if (readonly) { + /* Allow unlinked processing to proceed */ + mp->m_flags &= ~XFS_MOUNT_RDONLY; } error = xlog_recover_finish(mp->m_log); if (!error) xfs_log_work_queue(mp); + if (readonly) + mp->m_flags |= XFS_MOUNT_RDONLY; + return error; }