diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2010-06-03 12:44:30 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-06-03 12:44:30 +0200 |
commit | 6a6ca57de92fcae34603551ac944aa74758c30d4 (patch) | |
tree | 759f741019bdab40da2feecb13991aaa6310f05f /fs | |
parent | b4ca761577535b2b4d153689ee97342797dfff05 (diff) | |
download | linux-6a6ca57de92fcae34603551ac944aa74758c30d4.tar.gz linux-6a6ca57de92fcae34603551ac944aa74758c30d4.tar.bz2 linux-6a6ca57de92fcae34603551ac944aa74758c30d4.zip |
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: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/pipe.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/pipe.c b/fs/pipe.c index 541d6626f9d9..369a0245aab6 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -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; } |