Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libperfuse - only remove queued requests once they are e...
details: https://anonhg.NetBSD.org/src/rev/728eb1f6c302
branches: trunk
changeset: 757529:728eb1f6c302
user: manu <manu%NetBSD.org@localhost>
date: Thu Sep 02 08:58:06 2010 +0000
description:
- only remove queued requests once they are executed, not when they
are set to be scheduled later
- remove an unused argument to make lint happy
diffstat:
lib/libperfuse/ops.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diffs (84 lines):
diff -r 55397ef9158f -r 728eb1f6c302 lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c Thu Sep 02 07:31:16 2010 +0000
+++ b/lib/libperfuse/ops.c Thu Sep 02 08:58:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.5 2010/09/01 14:57:24 manu Exp $ */
+/* $NetBSD: ops.c,v 1.6 2010/09/02 08:58:06 manu Exp $ */
/*-
* Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -49,8 +49,7 @@
static int node_lookup_common(struct puffs_usermount *, puffs_cookie_t,
const char*, struct puffs_node **);
static int node_mk_common(struct puffs_usermount *, puffs_cookie_t,
- struct puffs_newinfo *, const struct puffs_cn *pcn,
- const struct vattr *, perfuse_msg_t *);
+ struct puffs_newinfo *, const struct puffs_cn *pcn, perfuse_msg_t *);
static const char *basename_r(const char *);
static ssize_t fuse_to_dirent(struct puffs_usermount *, puffs_cookie_t,
struct fuse_dirent *, size_t);
@@ -241,12 +240,11 @@
* perfuse_node_symlink
*/
static int
-node_mk_common(pu, opc, pni, pcn, vap, pm)
+node_mk_common(pu, opc, pni, pcn, pm)
struct puffs_usermount *pu;
puffs_cookie_t opc;
struct puffs_newinfo *pni;
const struct puffs_cn *pcn;
- const struct vattr *vap;
perfuse_msg_t *pm;
{
struct perfuse_state *ps;
@@ -545,6 +543,7 @@
#endif
puffs_cc_yield(pcq.pcq_cc);
+ TAILQ_REMOVE(&pnd->pnd_pcq, &pcq, pcq_next);
#ifdef PERFUSE_DEBUG
if (perfuse_diagflags & PDF_REQUEUE)
@@ -576,14 +575,12 @@
if (pcq->pcq_type != type)
continue;
- puffs_cc_schedule(pcq->pcq_cc);
- TAILQ_REMOVE(&pnd->pnd_pcq, pcq, pcq_next);
-
#ifdef PERFUSE_DEBUG
if (perfuse_diagflags & PDF_REQUEUE)
DPRINTF("%s: SCHEDULE opc = %p, pcc = %p\n",
__func__, (void *)opc, pcq->pcq_cc);
#endif
+ puffs_cc_schedule(pcq->pcq_cc);
if (++dequeued == max)
break;
@@ -970,7 +967,7 @@
fmi->umask = 0; /* Seems unused bu libfuse */
(void)strlcpy((char *)(void *)(fmi + 1), path, len - sizeof(*fmi));
- return node_mk_common(pu, opc, pni, pcn, vap, pm);
+ return node_mk_common(pu, opc, pni, pcn, pm);
}
@@ -1758,7 +1755,7 @@
fmi->umask = 0; /* Seems unused bu libfuse? */
(void)strlcpy((char *)(void *)(fmi + 1), path, len - sizeof(*fmi));
- return node_mk_common(pu, opc, pni, pcn, vap, pm);
+ return node_mk_common(pu, opc, pni, pcn, pm);
}
@@ -1848,7 +1845,7 @@
np += path_len;
(void)strlcpy(np, link_target, linkname_len);
- return node_mk_common(pu, opc, pni, pcn_src, vap, pm);
+ return node_mk_common(pu, opc, pni, pcn_src, pm);
}
int
Home |
Main Index |
Thread Index |
Old Index