From: Jeff Layton <jlayton@redhat.com>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Pavel Shilovsky
<piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
Josef Bacik <josef-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [patch v2] cifs: fix revalidation test in cifs_llseek()
Date: Mon, 30 Apr 2012 15:15:14 +0000 [thread overview]
Message-ID: <20120430111514.72b54efa@corrin.poochiereds.net> (raw)
In-Reply-To: <20120430143621.GK6447@mwanda>
On Mon, 30 Apr 2012 17:36:21 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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>
> ---
> v2: I had the test reversed in the first version.
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 811245b..4a6ad20 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;
>
Looks good.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2012-04-30 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 21:06 [patch] cifs: fix revalidation test in cifs_llseek() Dan Carpenter
[not found] ` <20120419210619.GA19074-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-04-27 12:59 ` Pavel Shilovsky
[not found] ` <CAKywueQrrHdqXXrHQbP=vjs_MLjksvR09cpax0iWw-PS6ms=fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-27 13:20 ` Pankaj Baranwal
2012-04-27 13:40 ` Jeff Layton
2012-04-30 14:36 ` [patch v2] " Dan Carpenter
2012-04-30 15:15 ` Jeff Layton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120430111514.72b54efa@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=josef-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox