diff mbox

xfs_io: Add missing perror for write_once (-O)

Message ID 20171206183633.2415-1-rgoldwyn@suse.de (mailing list archive)
State Accepted
Headers show

Commit Message

Goldwyn Rodrigues Dec. 6, 2017, 6:36 p.m. UTC
From: Goldwyn Rodrigues <rgoldwyn@suse.com>

This got missed in the last set of patches.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 io/pwrite.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Eric Sandeen March 2, 2018, 3:12 a.m. UTC | #1
On 12/6/17 12:36 PM, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
> 
> This got missed in the last set of patches.
> 
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

Sorry for missing this until now.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  io/pwrite.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/io/pwrite.c b/io/pwrite.c
> index a89edfd0..afbe4284 100644
> --- a/io/pwrite.c
> +++ b/io/pwrite.c
> @@ -271,8 +271,10 @@ write_once(
>  {
>  	ssize_t bytes;
>  	bytes = do_pwrite(file->fd, offset, count, count, pwritev2_flags);
> -	if (bytes < 0)
> +	if (bytes < 0) {
> +		perror("pwrite");
>  		return -1;
> +	}
>  	*total = bytes;
>  	return 1;
>  }
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/io/pwrite.c b/io/pwrite.c
index a89edfd0..afbe4284 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -271,8 +271,10 @@  write_once(
 {
 	ssize_t bytes;
 	bytes = do_pwrite(file->fd, offset, count, count, pwritev2_flags);
-	if (bytes < 0)
+	if (bytes < 0) {
+		perror("pwrite");
 		return -1;
+	}
 	*total = bytes;
 	return 1;
 }