summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-02-16 11:15:31 +0000
committerThomas Bushnell <thomas@gnu.org>1999-02-16 11:15:31 +0000
commitfe25b1e7fcbcc6a33aa95557e2799790bbd4e5e9 (patch)
treeb5b797838fc16047bfa4e3bf2792e9eb20fb4950
parent2f9e50d8ce60741143bb318f589db8c60d8404bd (diff)
minor repairs
-rw-r--r--libdiskfs/io-revoke.c7
-rw-r--r--libnetfs/io-revoke.c9
2 files changed, 11 insertions, 5 deletions
diff --git a/libdiskfs/io-revoke.c b/libdiskfs/io-revoke.c
index ddda95fa..90f8dc98 100644
--- a/libdiskfs/io-revoke.c
+++ b/libdiskfs/io-revoke.c
@@ -30,9 +30,12 @@ diskfs_S_io_revoke (struct protid *cred)
iterator_function (void *port)
{
struct protid *user = port;
-
- if ((user != cred) && (user->po->np == np))
+
+ if ((user.pi.class == diskfs_protid_class)
+ && (user != cred)
+ && (user->po->np == np))
ports_destroy_right (user);
+ return 0;
}
if (!cred)
diff --git a/libnetfs/io-revoke.c b/libnetfs/io-revoke.c
index 05f79f12..43ccae95 100644
--- a/libnetfs/io-revoke.c
+++ b/libnetfs/io-revoke.c
@@ -30,9 +30,12 @@ netfs_S_io_revoke (struct protid *cred)
iterator_function (void *port)
{
struct protid *user = port;
-
- if ((user != cred) && (user->po->np == np))
+
+ if ((user.pi.class == netfs_protid_class)
+ && (user != cred)
+ && (user->po->np == np))
ports_destroy_right (user);
+ return 0;
}
if (!cred)
@@ -51,7 +54,7 @@ netfs_S_io_revoke (struct protid *cred)
return err;
}
- ports_bucket_iterate (diskfs_port_bucket, iterator_function);
+ ports_bucket_iterate (netfs_port_bucket, iterator_function);
mutex_unlock (&np->lock);