diff options
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 3 |
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) | |||
51 | if (arg & O_NDELAY) | 51 | if (arg & O_NDELAY) |
52 | arg |= O_NONBLOCK; | 52 | arg |= O_NONBLOCK; |
53 | 53 | ||
54 | if (arg & O_DIRECT) { | 54 | /* Pipe packetized mode is controlled by O_DIRECT flag */ |
55 | if (!S_ISFIFO(filp->f_inode->i_mode) && (arg & O_DIRECT)) { | ||
55 | if (!filp->f_mapping || !filp->f_mapping->a_ops || | 56 | if (!filp->f_mapping || !filp->f_mapping->a_ops || |
56 | !filp->f_mapping->a_ops->direct_IO) | 57 | !filp->f_mapping->a_ops->direct_IO) |
57 | return -EINVAL; | 58 | return -EINVAL; |