The patch titled Subject: ceph, cifs, nfs, fuse: boolean and / or confusion has been added to the -mm tree. Its filename is ceph-cifs-nfs-fuse-boolean-and-or-confusion.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: roel <roel.kluin@xxxxxxxxx> Subject: ceph, cifs, nfs, fuse: boolean and / or confusion The test not SEEK_CUR or not SEEK_SET always evaluates to true. Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> Cc: Sage Weil <sage@xxxxxxxxxxxx> Cc: Steve French <sfrench@xxxxxxxxx> Cc: Miklos Szeredi <miklos@xxxxxxxxxx> Cc: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ceph/file.c | 2 +- fs/cifs/cifsfs.c | 2 +- fs/fuse/file.c | 2 +- fs/nfs/file.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff -puN fs/ceph/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion fs/ceph/file.c --- a/fs/ceph/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion +++ a/fs/ceph/file.c @@ -797,7 +797,7 @@ static loff_t ceph_llseek(struct file *f mutex_lock(&inode->i_mutex); __ceph_do_pending_vmtruncate(inode); - if (origin != SEEK_CUR || origin != SEEK_SET) { + if (origin != SEEK_CUR && origin != SEEK_SET) { ret = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE); if (ret < 0) { offset = ret; diff -puN fs/cifs/cifsfs.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion fs/cifs/cifsfs.c --- a/fs/cifs/cifsfs.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion +++ a/fs/cifs/cifsfs.c @@ -703,7 +703,7 @@ static loff_t cifs_llseek(struct file *f * 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; diff -puN fs/fuse/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion fs/fuse/file.c --- a/fs/fuse/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion +++ a/fs/fuse/file.c @@ -1556,7 +1556,7 @@ static loff_t fuse_file_llseek(struct fi struct inode *inode = file->f_path.dentry->d_inode; mutex_lock(&inode->i_mutex); - if (origin != SEEK_CUR || origin != SEEK_SET) { + if (origin != SEEK_CUR && origin != SEEK_SET) { retval = fuse_update_attributes(inode, NULL, file, NULL); if (retval) goto exit; diff -puN fs/nfs/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion fs/nfs/file.c --- a/fs/nfs/file.c~ceph-cifs-nfs-fuse-boolean-and-or-confusion +++ a/fs/nfs/file.c @@ -147,7 +147,7 @@ static loff_t nfs_file_llseek(struct fil * 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) { struct inode *inode = filp->f_mapping->host; int retval = nfs_revalidate_file_size(inode, filp); _ Subject: Subject: ceph, cifs, nfs, fuse: boolean and / or confusion Patches currently in -mm which might be from roel.kluin@xxxxxxxxx are linux-next.patch frv-duplicate-output_buffer-of-e03.patch frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch ceph-cifs-nfs-fuse-boolean-and-or-confusion.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html