From 99b75d353235aa383c280a9085dfe1f4a27aecb7 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 13 Aug 2004 13:44:08 -0700 Subject: [PATCH] Fix stupid thinkos in the fcntl f_op removal code. Tssk. --- fs/nfs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/file.c b/fs/nfs/file.c index ee2addb5c4493..6d9150de803aa 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -72,7 +72,7 @@ struct inode_operations nfs_file_inode_operations = { static int nfs_check_flags(int flags) { - if (flags & (O_APPEND | O_DIRECT)) + if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT)) return -EINVAL; return 0; @@ -89,7 +89,7 @@ nfs_file_open(struct inode *inode, struct file *filp) int res; res = nfs_check_flags(filp->f_flags); - if (!res) + if (res) return res; lock_kernel(); -- 2.53.0