mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
xfs: only bother with sync_filesystem during readonly remount
In commit02b9984d64
, we pushed a sync_filesystem() call from the VFS into xfs_fs_remount. The only time that we ever need to push dirty file data or metadata to disk for a remount is if we're remounting the filesystem read only, so this really could be moved to xfs_remount_ro. Once we've moved the call site, actually check the return value from sync_filesystem. Fixes:02b9984d64
("fs: push sync_filesystem() down to the file system's remount_fs()") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
cea267c235
commit
b97cca3ba9
@ -1749,6 +1749,11 @@ xfs_remount_ro(
|
||||
};
|
||||
int error;
|
||||
|
||||
/* Flush all the dirty data to disk. */
|
||||
error = sync_filesystem(mp->m_super);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
/*
|
||||
* Cancel background eofb scanning so it cannot race with the final
|
||||
* log force+buftarg wait and deadlock the remount.
|
||||
@ -1827,8 +1832,6 @@ xfs_fs_reconfigure(
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
sync_filesystem(mp->m_super);
|
||||
|
||||
/* inode32 -> inode64 */
|
||||
if (xfs_has_small_inums(mp) && !xfs_has_small_inums(new_mp)) {
|
||||
mp->m_features &= ~XFS_FEAT_SMALL_INUMS;
|
||||
|
Loading…
Reference in New Issue
Block a user