Skip to contentSkip to conversation

Patch "xfs: return errors in xfs_fs_sync_fs" has been added to the 5.15-stable tree

PATCH Sasha Levin 1 participant 1 message Apr 20, 2022 XFS filesystem

lore
Share & tools
lore

Sasha Levin

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xfs: return errors in xfs_fs_sync_fs

to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xfs-return-errors-in-xfs_fs_sync_fs.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 1325aa6868b83e6ae24efc43f0897f0faf50389d

Author: Darrick J. Wong <[email protected]>
Date:   Sun Jan 30 08:53:17 2022 -0800

xfs: return errors in xfs_fs_sync_fs

[ Upstream commit 2d86293c70750e4331e9616aded33ab6b47c299d ]

Now that the VFS will do something with the return values from ->sync_fs, make ours pass on error codes.

fs/xfs/xfs_super.c +5 -1
index c4e0cd1c1c8c..170fee98c45c 100644
@@ -729,6 +729,7 @@ xfs_fs_sync_fs(
 	int			wait)
 {
 	struct xfs_mount	*mp = XFS_M(sb);
+	int			error;
 
 	trace_xfs_fs_sync_fs(mp, __return_address);
 
@@ -738,7 +739,10 @@ xfs_fs_sync_fs(
 	if (!wait)
 		return 0;
 
-	xfs_log_force(mp, XFS_LOG_SYNC);
+	error = xfs_log_force(mp, XFS_LOG_SYNC);
+	if (error)
+		return error;
+
 	if (laptop_mode) {
 		/*
 		 * The disk must be active because we're syncing.