[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 79/98: trans/fakeroot: remove dead code
From: |
Samuel Thibault |
Subject: |
[hurd] 79/98: trans/fakeroot: remove dead code |
Date: |
Tue, 14 Jan 2014 02:00:04 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 0209a2f92b5693c72975572b7438ebc6d9865b6b
Author: Justus Winter <address@hidden>
Date: Tue Dec 10 17:03:25 2013 +0100
trans/fakeroot: remove dead code
* trans/fakeroot.c (netfs_S_dir_lookup): Remove dead code.
---
trans/fakeroot.c | 67 ++++++++++++++++++++++++--------------------------------
1 file changed, 29 insertions(+), 38 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index f278db1..58f1112 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -331,51 +331,42 @@ netfs_S_dir_lookup (struct protid *diruser,
}
mach_port_deallocate (mach_task_self (), fsidport);
- if (fsidport == netfs_fsys_identity)
- {
- /* Talking to ourselves! We just looked up one of our
- own nodes. Find the node and return it. */
- assert (! "reached");
- }
- else
+ pthread_mutex_lock (&idport_ihash_lock);
+ pthread_mutex_lock (&dnp->lock);
+ struct netnode *nn = hurd_ihash_find (&idport_ihash, idport);
+ if (nn != NULL)
{
- pthread_mutex_lock (&idport_ihash_lock);
- pthread_mutex_lock (&dnp->lock);
- struct netnode *nn = hurd_ihash_find (&idport_ihash, idport);
- if (nn != NULL)
- {
- assert (nn->np->nn == nn);
- np = nn->np;
- /* We already know about this node. */
- mach_port_deallocate (mach_task_self (), idport);
-
- if (np == dnp)
- {
- /* dnp is already locked. */
- }
- else
- {
- pthread_mutex_lock (&np->lock);
- pthread_mutex_unlock (&dnp->lock);
- }
-
- /* If the looked-up file carries a fake reference, we
- use that and clear the FAKE_REFERENCE flag. */
- if (np->nn->faked & FAKE_REFERENCE)
- np->nn->faked &= ~FAKE_REFERENCE;
- else
- netfs_nref (np);
+ assert (nn->np->nn == nn);
+ np = nn->np;
+ /* We already know about this node. */
+ mach_port_deallocate (mach_task_self (), idport);
- err = check_openmodes (np->nn, (flags & (O_RDWR|O_EXEC)), file);
- pthread_mutex_unlock (&idport_ihash_lock);
+ if (np == dnp)
+ {
+ /* dnp is already locked. */
}
else
{
- err = new_node (file, idport, 1, flags, &np);
+ pthread_mutex_lock (&np->lock);
pthread_mutex_unlock (&dnp->lock);
- if (!err)
- err = netfs_validate_stat (np, diruser->user);
}
+
+ /* If the looked-up file carries a fake reference, we
+ use that and clear the FAKE_REFERENCE flag. */
+ if (np->nn->faked & FAKE_REFERENCE)
+ np->nn->faked &= ~FAKE_REFERENCE;
+ else
+ netfs_nref (np);
+
+ err = check_openmodes (np->nn, (flags & (O_RDWR|O_EXEC)), file);
+ pthread_mutex_unlock (&idport_ihash_lock);
+ }
+ else
+ {
+ err = new_node (file, idport, 1, flags, &np);
+ pthread_mutex_unlock (&dnp->lock);
+ if (!err)
+ err = netfs_validate_stat (np, diruser->user);
}
if (err)
goto lose;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 01/98: pfinet: fix emission on the loopback device, (continued)
- [hurd] 01/98: pfinet: fix emission on the loopback device, Samuel Thibault, 2014/01/13
- [hurd] 63/98: libfshelp: use a hash table in get-identity.c, Samuel Thibault, 2014/01/13
- [hurd] 90/98: trans/mtab: populate mtab objects on demand, Samuel Thibault, 2014/01/13
- [hurd] 09/98: init: fix memory leak, Samuel Thibault, 2014/01/13
- [hurd] 88/98: libports: remove the threadvars stack size hack, Samuel Thibault, 2014/01/13
- [hurd] 02/98: Normalize whitespace at the end of each file to '\n', Samuel Thibault, 2014/01/13
- [hurd] 84/98: utils/rpctrace: handle MACH_MSG_TYPE_PORT_SEND rights in trace_and_forward, Samuel Thibault, 2014/01/13
- [hurd] 82/98: utils/rpctrace: generalize code in rewrite_right, Samuel Thibault, 2014/01/13
- [hurd] 86/98: utils/rpctrace: fix output so that replies can be attributed to requests, Samuel Thibault, 2014/01/13
- [hurd] 81/98: utils/mount: fix autodetection of fat file systems, Samuel Thibault, 2014/01/13
- [hurd] 79/98: trans/fakeroot: remove dead code,
Samuel Thibault <=
- [hurd] 85/98: utils/rpctrace: escape non-printable characters in strings, Samuel Thibault, 2014/01/13
- [hurd] 80/98: trans/fakeroot: remove dead code, Samuel Thibault, 2014/01/13
- [hurd] 83/98: utils/rpctrace: generalize tracing code, Samuel Thibault, 2014/01/13
- [hurd] 89/98: libps: fix process user and system times, Samuel Thibault, 2014/01/13
- [hurd] 87/98: trans/fakeroot: shutdown the translator if the last client is gone, Samuel Thibault, 2014/01/13