提交 6a6ca57d 编写于 作者: J Jens Axboe

pipe: adjust minimum pipe size to 1 page

We don't need to pages to guarantee the POSIX requirement
that upto a page size write must be atomic to an empty
pipe.
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 b4ca7615
......@@ -1181,13 +1181,7 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
if (!capable(CAP_SYS_ADMIN) && nr_pages > pipe_max_pages) {
ret = -EPERM;
goto out;
}
/*
* The pipe needs to be at least 2 pages large to
* guarantee POSIX behaviour.
*/
if (arg < 2) {
} else if (nr_pages < 1) {
ret = -EINVAL;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册