projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4ca761
)
pipe: adjust minimum pipe size to 1 page
author
Jens Axboe
<jaxboe@fusionio.com>
Thu, 3 Jun 2010 10:44:30 +0000
(12:44 +0200)
committer
Jens Axboe
<jaxboe@fusionio.com>
Thu, 3 Jun 2010 10:44:30 +0000
(12:44 +0200)
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>
fs/pipe.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/pipe.c
b/fs/pipe.c
index 541d6626f9d93d060541d601494064a825fa7622..369a0245aab65e826a15e7a8e08f287a8a47183d 100644
(file)
--- 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;
}