浏览代码

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 14 年之前
父节点
当前提交
e5953cbdff
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
 			error = ops->confirm(pipe, buf);
 			if (error) {
 			if (error) {
 				if (!ret)
 				if (!ret)
-					error = ret;
+					ret = error;
 				break;
 				break;
 			}
 			}