projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99aef42
)
[PATCH] fadvise: return ESPIPE on FIFO/pipe
author
Valentine Barshak
<vbarshak@ru.mvista.com>
Sun, 8 Jan 2006 09:03:44 +0000
(
01:03
-0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:14:00 +0000
(20:14 -0800)
The patch makes posix_fadvise return ESPIPE on FIFO/pipe in order to be
fully POSIX-compliant.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/fadvise.c
patch
|
blob
|
history
diff --git
a/mm/fadvise.c
b/mm/fadvise.c
index 5f19e87bc5af1c86dd121d7e50dcd3e5cc1c7e94..d257c89e7704c60d8decf405c89c46f8de262153 100644
(file)
--- a/
mm/fadvise.c
+++ b/
mm/fadvise.c
@@
-37,6
+37,11
@@
asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
if (!file)
return -EBADF;
+ if (S_ISFIFO(file->f_dentry->d_inode->i_mode)) {
+ ret = -ESPIPE;
+ goto out;
+ }
+
mapping = file->f_mapping;
if (!mapping || len < 0) {
ret = -EINVAL;