[Devel] [PATCH rh7] fcntl: allow pipes with O_DIRECT regardless "odirect_enable" status
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Tue Dec 15 06:32:35 PST 2015
This flag represents packetized mode for pipes, which only changes how pipe
holds packets, and shouldn't be affected by "odirect_enable" toggle.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
fs/fcntl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fcntl.c b/fs/fcntl.c
index cfa349c..1df1ffa 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -70,7 +70,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
struct inode * inode = file_inode(filp);
int error = 0;
- if (!may_use_odirect())
+ if (!S_ISFIFO(filp->f_mode) && !may_use_odirect(filp))
arg &= ~O_DIRECT;
if (ve_fsync_behavior() == FSYNC_NEVER)
arg &= ~O_SYNC;
More information about the Devel
mailing list