Skip to content

Commit 2d86293

Browse files
author
Darrick J. Wong
committed
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> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Christian Brauner <brauner@kernel.org>
1 parent dd5532a commit 2d86293

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/xfs/xfs_super.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ xfs_fs_sync_fs(
735735
int wait)
736736
{
737737
struct xfs_mount *mp = XFS_M(sb);
738+
int error;
738739

739740
trace_xfs_fs_sync_fs(mp, __return_address);
740741

@@ -744,7 +745,10 @@ xfs_fs_sync_fs(
744745
if (!wait)
745746
return 0;
746747

747-
xfs_log_force(mp, XFS_LOG_SYNC);
748+
error = xfs_log_force(mp, XFS_LOG_SYNC);
749+
if (error)
750+
return error;
751+
748752
if (laptop_mode) {
749753
/*
750754
* The disk must be active because we're syncing.

0 commit comments

Comments
 (0)