From: Dan Carpenter Date: Mon, 30 Apr 2012 14:36:21 +0000 (+0300) Subject: cifs: fix revalidation test in cifs_llseek() X-Git-Tag: accepted/tizen/common/20141203.182822~4687^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48a5730e5b71201e226ff06e245bf308feba5f10;p=platform%2Fkernel%2Flinux-arm64.git 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 Reviewed-by: Jeff Layton Signed-off-by: Steve French --- 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;