diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-26 18:53:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-26 18:53:19 +0100 |
commit | 3bd9dd813820a258fdd7df5444b550b2b1a71db6 (patch) | |
tree | 9df85487cbab42355cb8ed73c8dee43223405a24 /fs | |
parent | Merge tag 'configfs-5.17-2022-02-25' of git://git.infradead.org/users/hch/con... (diff) | |
parent | xfs: only bother with sync_filesystem during readonly remount (diff) | |
download | linux-3bd9dd813820a258fdd7df5444b550b2b1a71db6.tar.xz linux-3bd9dd813820a258fdd7df5444b550b2b1a71db6.zip |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 4c0dee78b2f8..d84714e4e46a 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1753,6 +1753,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. @@ -1831,8 +1836,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; |