Skip to content

Commit

Permalink
pipe: adjust minimum pipe size to 1 page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Jun 3, 2010
1 parent b4ca761 commit 6a6ca57
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6a6ca57

Please sign in to comment.