Commit 2d86293c authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarChristian Brauner <brauner@kernel.org>
parent dd5532a4
...@@ -735,6 +735,7 @@ xfs_fs_sync_fs( ...@@ -735,6 +735,7 @@ xfs_fs_sync_fs(
int wait) int wait)
{ {
struct xfs_mount *mp = XFS_M(sb); struct xfs_mount *mp = XFS_M(sb);
int error;
trace_xfs_fs_sync_fs(mp, __return_address); trace_xfs_fs_sync_fs(mp, __return_address);
...@@ -744,7 +745,10 @@ xfs_fs_sync_fs( ...@@ -744,7 +745,10 @@ xfs_fs_sync_fs(
if (!wait) if (!wait)
return 0; return 0;
xfs_log_force(mp, XFS_LOG_SYNC); error = xfs_log_force(mp, XFS_LOG_SYNC);
if (error)
return error;
if (laptop_mode) { if (laptop_mode) {
/* /*
* The disk must be active because we're syncing. * The disk must be active because we're syncing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment