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: Jens Axboe <jaxboe@fusionio.com>
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;
}