Skip to contentSkip to conversation

xfs_io: Add missing perror for write_once (-O)

PATCH In review Goldwyn Rodrigues 2 participants 2 messages Dec 6, 2017 – Mar 2, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_io: Add missing perror for write_once (-O)

From: Goldwyn Rodrigues <[email protected]>

This got missed in the last set of patches.

---
 io/pwrite.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
io/pwrite.c +3 -1
index a89edfd0..afbe4284 100644
@@ -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;
 }
Signature · 1 line
2.14.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Goldwyn Rodrigues

From: Goldwyn Rodrigues <[email protected]>

This got missed in the last set of patches.

Sorry for missing this until now.

Quoted 21 lines
---
 io/pwrite.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
io/pwrite.c +3 -1
index a89edfd0..afbe4284 100644
@@ -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;
 }