summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-04-30 17:36:21 +0300
committerSteve French <sfrench@us.ibm.com>2012-05-09 15:16:22 -0500
commit48a5730e5b71201e226ff06e245bf308feba5f10 (patch)
tree2018cd2924ed13f736032beec587858c5e688ce1 /fs
parent7ee94d97aafacf5a019b3578e0eae6daa2e2bcd5 (diff)
downloadop-kernel-dev-48a5730e5b71201e226ff06e245bf308feba5f10.zip
op-kernel-dev-48a5730e5b71201e226ff06e245bf308feba5f10.tar.gz
cifs: fix revalidation test in cifs_llseek()
This test is always true so it means we revalidate the length every time, which generates more network traffic. When it is SEEK_SET or SEEK_CUR, then we don't need to revalidate. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ca6a379..541ef81 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -699,7 +699,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;
OpenPOWER on IntegriCloud