diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2009-05-27 10:17:24 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2009-05-27 10:17:24 +0000 |
commit | 0db74cc67c5e14e54f2e61bd586139776ab56452 (patch) | |
tree | 52a610f33eed9e1a5c3b19232b4c902f7250c8c1 /lib | |
parent | 78cbfe5972209b0a32453f127dcc9f652eedeeaa (diff) | |
download | libfuse-0db74cc67c5e14e54f2e61bd586139776ab56452.tar.gz |
Don't call forget_node() if the lookup was negative and write()
for the reply returned ENOENT. Reported by John Haxby
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1908,8 +1908,11 @@ static void reply_entry(fuse_req_t req, const struct fuse_entry_param *e, { if (!err) { struct fuse *f = req_fuse(req); - if (fuse_reply_entry(req, e) == -ENOENT) - forget_node(f, e->ino, 1); + if (fuse_reply_entry(req, e) == -ENOENT) { + /* Skip forget for negative result */ + if (e->ino != 0) + forget_node(f, e->ino, 1); + } } else reply_err(req, err); } |