Explorar o código

pipe: fix failure to return error code on ->confirm()

The arguments were transposed, we want to assign the error code to
'ret', which is being returned.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Nicolas Kaiser %!s(int64=14) %!d(string=hai) anos
pai
achega
e5953cbdff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fs/pipe.c

+ 1 - 1
fs/pipe.c

@@ -382,7 +382,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
 			error = ops->confirm(pipe, buf);
 			if (error) {
 				if (!ret)
-					error = ret;
+					ret = error;
 				break;
 			}