提交 2d86293c 编写于 作者: D 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: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NJan Kara <jack@suse.cz>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NChristian Brauner <brauner@kernel.org>
上级 dd5532a4
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册