nfs: fix fl_type tests in NFSv4 code
[linux-2.6-block.git] / fs / nfs / nfs4proc.c
index 5e373c30e8d42cdcb534dc981ce350e001e4b19e..6843e0a37de8eb900421ae118d76c889afe041ef 100644 (file)
@@ -4885,7 +4885,7 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
         * Don't rely on the VFS having checked the file open mode,
         * since it won't do this for flock() locks.
         */
-       switch (request->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) {
+       switch (request->fl_type) {
        case F_RDLCK:
                if (!(filp->f_mode & FMODE_READ))
                        return -EBADF;