Whamcloud - gitweb
LU-507 check_write_rcs() return -EPROTO instead of -ENOSPC
authorJohann Lombardi <johann@whamcloud.com>
Tue, 19 Jul 2011 12:15:58 +0000 (14:15 +0200)
committerOleg Drokin <green@whamcloud.com>
Sun, 24 Jul 2011 18:40:14 +0000 (14:40 -0400)
remote_rcs[i] is an unsigned value so the check remote_rcs[i] < 0 is
always false.

Change-Id: I5468d9185e4c8de819f58693375e9d96722b9fbb
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1115
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c

index 44e51c1..a7cc433 100644 (file)
@@ -1197,7 +1197,7 @@ static int check_write_rcs(struct ptlrpc_request *req,
 
         /* return error if any niobuf was in error */
         for (i = 0; i < niocount; i++) {
-                if (remote_rcs[i] < 0)
+                if ((int)remote_rcs[i] < 0)
                         return(remote_rcs[i]);
 
                 if (remote_rcs[i] != 0) {