]> git.hungrycats.org Git - linux/commit
jfs: fix readdir cookie incompatibility with NFSv4
authorDave Kleikamp <dave.kleikamp@oracle.com>
Thu, 15 Aug 2013 20:36:49 +0000 (15:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Sep 2013 04:58:13 +0000 (21:58 -0700)
commite446ef9608a07af0cf07aa887ddf37224fd345d8
tree72cb705768d5adb6a728ac4b9ed68e47ad789f52
parentf571d16dee723cb888ce2bce2217cfa8c2ccebfe
jfs: fix readdir cookie incompatibility with NFSv4

commit 44512449c0ab368889dd13ae0031fba74ee7e1d2 upstream.

NFSv4 reserves readdir cookie values 0-2 for special entries (. and ..),
but jfs allows a value of 2 for a non-special entry. This incompatibility
can result in the nfs client reporting a readdir loop.

This patch doesn't change the value stored internally, but adds one to
the value exposed to the iterate method.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
[bwh: Backported to 3.2:
 - Adjust context
 - s/ctx->pos/filp->f_pos/]
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jfs/jfs_dtree.c