]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ceph, cifs, nfs, fuse: boolean and / or confusion
authorroel <roel.kluin@gmail.com>
Tue, 20 Mar 2012 23:49:17 +0000 (10:49 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 2 Apr 2012 03:20:26 +0000 (13:20 +1000)
The test not SEEK_CUR or not SEEK_SET always evaluates to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Sage Weil <sage@newdream.net>
Cc: Steve French <sfrench@samba.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/cifs/cifsfs.c

index d34212822444221d8698b716bc817857ab577f5d..1e775d884a74a6698e7c69565fd3af893fb005f3 100644 (file)
@@ -695,7 +695,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
         * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
         * the cached file length
         */
-       if (origin != SEEK_SET || origin != SEEK_CUR) {
+       if (origin != SEEK_SET && origin != SEEK_CUR) {
                int rc;
                struct inode *inode = file->f_path.dentry->d_inode;