[PATCH 1/7] xfs: ensure sync write errors are returned
Christoph Hellwig
hch at infradead.org
Thu Dec 16 05:57:38 CST 2010
> 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?
More information about the xfs
mailing list