Re: [PATCH 4/4] xfs: return errors in xfs_fs_sync_fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 25-01-22 18:18:31, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_super.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Makes sence. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza
> 
> 
> 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.
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux