All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, jack@suse.com
Subject: [PATCH 4/4] xfs: return errors in xfs_fs_sync_fs
Date: Tue, 25 Jan 2022 18:18:31 -0800	[thread overview]
Message-ID: <164316351155.2600168.3007243245021307622.stgit@magnolia> (raw)
In-Reply-To: <164316348940.2600168.17153575889519271710.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

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>
---
 fs/xfs/xfs_super.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index e8f37bdc8354..4c0dee78b2f8 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -735,6 +735,7 @@ xfs_fs_sync_fs(
 	int			wait)
 {
 	struct xfs_mount	*mp = XFS_M(sb);
+	int			error;
 
 	trace_xfs_fs_sync_fs(mp, __return_address);
 
@@ -744,7 +745,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.


  parent reply	other threads:[~2022-01-26  2:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  2:18 [PATCHSET 0/4] vfs: actually return fs errors from ->sync_fs Darrick J. Wong
2022-01-26  2:18 ` [PATCH 1/4] vfs: make freeze_super abort when sync_filesystem returns error Darrick J. Wong
2022-01-26 10:43   ` Jan Kara
2022-01-26 17:01   ` Christoph Hellwig
2022-01-26  2:18 ` [PATCH 2/4] vfs: make sync_filesystem return errors from ->sync_fs Darrick J. Wong
2022-01-26 10:44   ` Jan Kara
2022-01-26 17:01   ` Christoph Hellwig
2022-01-26  2:18 ` [PATCH 3/4] quota: make dquot_quota_sync " Darrick J. Wong
2022-01-26 10:45   ` Jan Kara
2022-01-26 17:03   ` Christoph Hellwig
2022-01-26  2:18 ` Darrick J. Wong [this message]
2022-01-26 10:45   ` [PATCH 4/4] xfs: return errors in xfs_fs_sync_fs Jan Kara
2022-01-26 17:03   ` Christoph Hellwig
2022-01-26  8:21 ` [PATCHSET 0/4] vfs: actually return fs errors from ->sync_fs Christian Brauner
2022-01-26 18:05   ` Darrick J. Wong
2022-01-27  9:11     ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164316351155.2600168.3007243245021307622.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.