]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix NFS client screw-up in fcntl f_op removal
authorJeff Garzik <jgarzik@pobox.com>
Fri, 13 Aug 2004 20:52:45 +0000 (13:52 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 13 Aug 2004 20:52:45 +0000 (13:52 -0700)
Fix stupid thinkos in the fcntl f_op removal code.

fs/nfs/file.c

index ee2addb5c4493bcb11250f8a817cfd361ca843be..6d9150de803aa36dff2a8f9945ea6e3b10c58d81 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();