From da7b7a48e8e5f5f8a18dafc3f6387d3a4eb0e1bb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Feb 1999 04:21:15 +0000 Subject: 1999-02-16 Roland McGrath * io-revoke.c (diskfs_S_io_revoke): Fix typo in 1999-02-16 change. --- libdiskfs/io-revoke.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libdiskfs/io-revoke.c b/libdiskfs/io-revoke.c index 90f8dc98..fb97c46e 100644 --- a/libdiskfs/io-revoke.c +++ b/libdiskfs/io-revoke.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 1999 Free Software Foundation Written by Thomas Bushnell, BSG. @@ -26,12 +26,12 @@ diskfs_S_io_revoke (struct protid *cred) error_t err; struct node *np; - error_t + error_t iterator_function (void *port) { struct protid *user = port; - - if ((user.pi.class == diskfs_protid_class) + + if ((user->pi.class == diskfs_protid_class) && (user != cred) && (user->po->np == np)) ports_destroy_right (user); @@ -40,23 +40,21 @@ diskfs_S_io_revoke (struct protid *cred) if (!cred) return EOPNOTSUPP; - + np = cred->po->np; mutex_lock (&np->lock); - + err = fshelp_isowner (&np->dn_stat, cred->user); if (err) { mutex_unlock (&np->lock); return err; } - + ports_bucket_iterate (diskfs_port_bucket, iterator_function); mutex_unlock (&np->lock); return 0; } - - -- cgit v1.2.3