Dominique Martinet has uploaded this change for review.

View Change

9p readdir: change custom offsets from 1/2 to -1/-2

The linux VFS with a tmpfs filesystem will return offset=2 in a
directory with a single entry (+./..), leading with this code into an
infinite loop (the client keeps sending readdirs until there is nothing
to read, but the last offset is 2 so it resets to 0 because of our
hardcoded ./.. cases)

This has the same theorical problem, but hopefully we won't see very big
offsets?...

Change-Id: Ifbbd59959b0e05f4018435e913a6b8696ca4534e
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
---
M src/Protocols/9P/9p_readdir.c
1 file changed, 7 insertions(+), 7 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/13/420213/1

To view, visit change 420213. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbbd59959b0e05f4018435e913a6b8696ca4534e
Gerrit-Change-Number: 420213
Gerrit-PatchSet: 1
Gerrit-Owner: Dominique Martinet <asmadeus@codewreck.org>