From: Marc Fiuczynski Date: Sun, 13 Mar 2005 03:12:53 +0000 (+0000) Subject: nfs file fix X-Git-Tag: planetlab-3_0-rc14~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b98aaf48165fc81aeec5591006ac3933fc2c9fe9;p=linux-2.6.git nfs file fix --- diff --git a/fs/nfs/file.c b/fs/nfs/file.c index ee2addb5c..6d9150de8 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();