]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/fcntl.c
ARM: dts: imx6ul: add gpmi support
[karo-tx-linux.git] / fs / fcntl.c
index ee85cd4e136abbff33409fb018343028d21578e2..350a2c8cfd28f3f1339613b31564da1c2422e917 100644 (file)
@@ -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;