Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libperfuse Copy node expiration date before comparing it...



details:   https://anonhg.NetBSD.org/src/rev/a83291a7c7c3
branches:  trunk
changeset: 771258:a83291a7c7c3
user:      manu <manu%NetBSD.org@localhost>
date:      Thu Nov 17 02:28:21 2011 +0000

description:
Copy node expiration date before comparing it, otherwise the comparison
does not work (no idea why) and cached node is never used.

diffstat:

 lib/libperfuse/ops.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 678f354703b2 -r a83291a7c7c3 lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c      Thu Nov 17 01:22:30 2011 +0000
+++ b/lib/libperfuse/ops.c      Thu Nov 17 02:28:21 2011 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.45 2011/11/16 04:52:40 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.46 2011/11/17 02:28:21 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -374,12 +374,13 @@
        puffs_cookie_t opc;
 {
        struct perfuse_node_data *pnd = PERFUSE_NODE_DATA(opc);
+       struct timespec expire = pnd->pnd_entry_expire;
        struct timespec now;
 
        if (clock_gettime(CLOCK_REALTIME, &now) != 0)
                DERR(EX_OSERR, "clock_gettime failed");
 
-       return timespeccmp(&pnd->pnd_entry_expire, &now, <);
+       return timespeccmp(&expire, &now, <);
 }
 
 



Home | Main Index | Thread Index | Old Index