[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1380411144-9236-5-git-send-email-geyslan@gmail.com>
Date: Sat, 28 Sep 2013 20:32:17 -0300
From: "Geyslan G. Bem" <geyslan@...il.com>
To: ericvh@...il.com, rminnich@...dia.gov, lucho@...kov.net
Cc: v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
"Geyslan G. Bem" <geyslan@...il.com>
Subject: [PATCH] 9p: fix return value in case of error in v9fs_fid_xattr_set
In case of error in the p9_client_write, the function v9fs_fid_xattr_set
should return its negative value, what was never being done.
Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
---
fs/9p/xattr.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index 3c28cdf..0788388 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -149,11 +149,10 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
write_count = value_len;
write_count = p9_client_write(fid, ((char *)value)+offset,
NULL, offset, write_count);
- if (write_count < 0) {
- /* error in xattr write */
- retval = write_count;
- break;
- }
+ /* error in xattr write */
+ if (write_count < 0)
+ return write_count;
+
offset += write_count;
value_len -= write_count;
}
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists