[PATCH] fuse: fix bug in negative lookup
authorMiklos Szeredi <miklos@szeredi.hu>
Wed, 1 Mar 2006 00:59:03 +0000 (16:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Mar 2006 04:53:43 +0000 (20:53 -0800)
commit50322fe7d46b544d5649edb58bdbe5c95dd44b98
tree0d6b61c08b2e61657278b7ff54529013f9e46d85
parent511030bcd24119fa3759ef3f914d354e107ef839
[PATCH] fuse: fix bug in negative lookup

If negative entries (nodeid == 0) were sent in reply to LOOKUP requests,
two bugs could be triggered:

- looking up a negative entry would return -EIO,

- revaildate on an entry which turned negative would send a FORGET
  request with zero nodeid, which would cause an abort() in the
  library.

The above would only happen if the 'negative_timeout=N' option was used,
otherwise lookups reply -ENOENT, which worked correctly.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fuse/dir.c