]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix actimeo=0 corner case when cifs_i->time == jiffies
authorJeff Layton <jlayton@redhat.com>
Wed, 26 Mar 2014 14:24:23 +0000 (07:24 -0700)
committerSteve French <smfrench@gmail.com>
Fri, 25 Apr 2014 03:37:03 +0000 (22:37 -0500)
commit6a7331d38bc11289ce75146359a45a198731fbef
tree5e5da8ae521dc675775ee65f0964121a5d752d26
parentadb91bc88a73f1b9abea9fac4fe3f337f610e7f2
cifs: fix actimeo=0 corner case when cifs_i->time == jiffies

actimeo=0 is supposed to be a special case that ensures that inode
attributes are always refetched from the server instead of trusting the
cache. The cifs code however uses time_in_range() to determine whether
the attributes have timed out. In the case where cifs_i->time equals
jiffies, this leads to the cifs code not refetching the inode attributes
when it should.

Fix this by explicitly testing for actimeo=0, and handling it as a
special case.

Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/inode.c