Skip to content

Commit 3bd9dd8

Browse files
committed
Merge tag 'xfs-5.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong: "Nothing exciting, just more fixes for not returning sync_filesystem error values (and eliding it when it's not necessary). Summary: - Only call sync_filesystem when we're remounting the filesystem readonly readonly, and actually check its return value" * tag 'xfs-5.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: only bother with sync_filesystem during readonly remount
2 parents 9137eda + b97cca3 commit 3bd9dd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fs/xfs/xfs_super.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,6 +1753,11 @@ xfs_remount_ro(
17531753
};
17541754
int error;
17551755

1756+
/* Flush all the dirty data to disk. */
1757+
error = sync_filesystem(mp->m_super);
1758+
if (error)
1759+
return error;
1760+
17561761
/*
17571762
* Cancel background eofb scanning so it cannot race with the final
17581763
* log force+buftarg wait and deadlock the remount.
@@ -1831,8 +1836,6 @@ xfs_fs_reconfigure(
18311836
if (error)
18321837
return error;
18331838

1834-
sync_filesystem(mp->m_super);
1835-
18361839
/* inode32 -> inode64 */
18371840
if (xfs_has_small_inums(mp) && !xfs_has_small_inums(new_mp)) {
18381841
mp->m_features &= ~XFS_FEAT_SMALL_INUMS;

0 commit comments

Comments
 (0)