nfs file fix
authorMarc Fiuczynski <mef@cs.princeton.edu>
Sun, 13 Mar 2005 03:12:53 +0000 (03:12 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Sun, 13 Mar 2005 03:12:53 +0000 (03:12 +0000)
fs/nfs/file.c

index ee2addb..6d9150d 100644 (file)
@@ -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();