public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "xfs: return errors in xfs_fs_sync_fs" has been added to the 5.15-stable tree
@ 2022-04-20 14:51 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2022-04-20 14:51 UTC (permalink / raw)
  To: stable-commits, djwong; +Cc: linux-xfs

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 <stable@vger.kernel.org> know about it.



commit 1325aa6868b83e6ae24efc43f0897f0faf50389d
Author: Darrick J. Wong <djwong@kernel.org>
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.
    
    Signed-off-by: Darrick J. Wong <djwong@kernel.org>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Acked-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index c4e0cd1c1c8c..170fee98c45c 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-20 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-20 14:51 Patch "xfs: return errors in xfs_fs_sync_fs" has been added to the 5.15-stable tree Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox