From: Nicolas Kaiser Date: Thu, 21 Oct 2010 12:56:00 +0000 (+0200) Subject: pipe: fix failure to return error code on ->confirm() X-Git-Tag: firefly_0821_release~9833^2~79^2^2~327 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6021775fb632a6d40271c1bb2694b92df5b9a414;p=firefly-linux-kernel-4.4.55.git pipe: fix failure to return error code on ->confirm() commit e5953cbdff26f7cbae7eff30cd9b18c4e19b7594 upstream. The arguments were transposed, we want to assign the error code to 'ret', which is being returned. Signed-off-by: Nicolas Kaiser Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/pipe.c b/fs/pipe.c index 279eef96c51c..37eb1ebeaa90 100644 --- a/fs/pipe.c +++ b/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; }