]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: only bother with sync_filesystem during readonly remount
authorDarrick J. Wong <djwong@kernel.org>
Tue, 23 Aug 2022 12:11:36 +0000 (15:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:15:14 +0000 (17:15 +0200)
commit70d560e2fb5e4505121f58ceb0df5b1f905c71cc
treebad6780de3965f53dd4b8afadf6b4dcc83b62dad
parent37837bc3ef317e33dd37d53f62283aeb2a8eaa0e
xfs: only bother with sync_filesystem during readonly remount

commit b97cca3ba9098522e5a1c3388764ead42640c1a5 upstream.

In commit 02b9984d6408, 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: 02b9984d6408 ("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>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_super.c