Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48a5730e authored by Dan Carpenter's avatar Dan Carpenter Committed by Steve French
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 7ee94d97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;