summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-01-25 16:10:47 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-01-30 09:36:28 -0800
commit0817023495eba9a14ac8c5322904491d194d21d8 (patch)
treef987f30b0d571e54e427126ca3e1d0815fef0a39
parent7f5634a7797cbc343bfaac9edb8051dc2fe7a51f (diff)
xfs: return errors in xfs_fs_sync_fs
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>
-rw-r--r--fs/xfs/xfs_super.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index c7ac486ca5d3..30c0130f9344 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -730,6 +730,7 @@ xfs_fs_sync_fs(
int wait)
{
struct xfs_mount *mp = XFS_M(sb);
+ int error;
trace_xfs_fs_sync_fs(mp, __return_address);
@@ -739,7 +740,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.