xfs
[Top] [All Lists]

Re: [PATCH 1/7] xfs: ensure sync write errors are returned

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/7] xfs: ensure sync write errors are returned
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 16 Dec 2010 06:57:38 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1292376208-16282-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1292376208-16282-1-git-send-email-david@xxxxxxxxxxxxx> <1292376208-16282-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
>               error2 = filemap_write_and_wait_range(mapping, pos, end);
> -             if (!error)
> +             if (error2)
>                       error = error2;
>               if (need_i_mutex)
>                       mutex_lock(&inode->i_mutex);
> @@ -777,7 +777,7 @@ write_retry:
>  
>               error2 = -xfs_file_fsync(file,
>                                        (file->f_flags & __O_SYNC) ? 0 : 1);
> -             if (!error)
> +             if (error2 && error >= 0)
>                       error = error2;

Shouldn't the filemap_write_and_wait_range clause use a similar check as
this one?

<Prev in Thread] Current Thread [Next in Thread>