]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix spurious readdir cookie loop messages
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 30 Jul 2011 16:45:35 +0000 (12:45 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 30 Jul 2011 18:34:50 +0000 (14:34 -0400)
commit7494b541e5f27587c39020416dbad2e02ecfbc83
tree4c6f0d852456581a7ca17286601d18d7bb030632
parentedca5aedce2e12af964264035cce4dd91d6498dc
NFS: Fix spurious readdir cookie loop messages

If the directory contents change, then we have to accept that the
file->f_pos value may shrink if we do a 'search-by-cookie'. In that
case, we should turn off the loop detection and let the NFS client
try to recover.

The patch also fixes a second loop detection bug by ensuring
that after turning on the ctx->duped flag, we read at least one new
cookie into ctx->dir_cookie before attempting to match with
ctx->dup_cookie.

Reported-by: Petr Vandrovec <petr@vandrovec.name>
Cc: stable@kernel.org [2.6.39+]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
include/linux/nfs_fs.h