Module Name: src
Committed By: manu
Date: Sat Nov 3 15:43:20 UTC 2012
Modified Files:
src/lib/libperfuse: ops.c
Log Message:
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libperfuse/ops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.59 src/lib/libperfuse/ops.c:1.60
--- src/lib/libperfuse/ops.c:1.59 Sat Jul 21 05:49:42 2012
+++ src/lib/libperfuse/ops.c Sat Nov 3 15:43:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.59 2012/07/21 05:49:42 manu Exp $ */
+/* $NetBSD: ops.c,v 1.60 2012/11/03 15:43:20 manu Exp $ */
/*-
* Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -433,6 +433,16 @@ node_lookup_common(struct puffs_usermoun
feo = GET_OUTPAYLOAD(ps, pm, fuse_entry_out);
+ /*
+ * Starting with ABI 7.4, inode number 0 means ENOENT,
+ * with entry_valid / entry_valid_nsec giving negative
+ * cache timeout (which we do not implement yet).
+ */
+ if (feo->attr.ino == 0) {
+ ps->ps_destroy_msg(pm);
+ return ENOENT;
+ }
+
/*
* Check for a known node, not reclaimed, with another name.
* It may have been moved, or we can lookup ../