提交 48a5730e 编写于 作者: D Dan Carpenter 提交者: Steve French

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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 7ee94d97
...@@ -699,7 +699,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) ...@@ -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 * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
* the cached file length * the cached file length
*/ */
if (origin != SEEK_SET || origin != SEEK_CUR) { if (origin != SEEK_SET && origin != SEEK_CUR) {
int rc; int rc;
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file->f_path.dentry->d_inode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册