summaryrefslogtreecommitdiff
path: root/fs/fcntl.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-01-25 21:46:21 +0300
committerTony Lindgren <tony@atomide.com>2016-01-25 21:46:21 +0300
commit7e3b1207705c10ada363bbc7d0235730ce1f5b79 (patch)
treecd1eb567acb4e72c1bdfbe8b59746c73b8627ee5 /fs/fcntl.c
parent143c6fe3a415edf2dde3f507b3a00998b4c4001e (diff)
parent20437f79f6627a31752f422688a6047c25cefcf1 (diff)
downloadlinux-7e3b1207705c10ada363bbc7d0235730ce1f5b79.tar.xz
Merge branch 'enable-devices' into omap-for-v4.5/fixes
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r--fs/fcntl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c
index ee85cd4e136a..350a2c8cfd28 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -51,7 +51,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
if (arg & O_NDELAY)
arg |= O_NONBLOCK;
- if (arg & O_DIRECT) {
+ /* Pipe packetized mode is controlled by O_DIRECT flag */
+ if (!S_ISFIFO(filp->f_inode->i_mode) && (arg & O_DIRECT)) {
if (!filp->f_mapping || !filp->f_mapping->a_ops ||
!filp->f_mapping->a_ops->direct_IO)
return -EINVAL;