linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-xfs@vger.kernel.org
Cc: Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH] xfs_io: Add missing perror for write_once (-O)
Date: Wed,  6 Dec 2017 12:36:33 -0600	[thread overview]
Message-ID: <20171206183633.2415-1-rgoldwyn@suse.de> (raw)

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(-)

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;
 }
-- 
2.14.2


             reply	other threads:[~2017-12-06 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 18:36 Goldwyn Rodrigues [this message]
2018-03-02  3:12 ` [PATCH] xfs_io: Add missing perror for write_once (-O) Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206183633.2415-1-rgoldwyn@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=rgoldwyn@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).