commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 74/98: trans: unlock nodes with faked attributes in fakeroot


From: Samuel Thibault
Subject: [hurd] 74/98: trans: unlock nodes with faked attributes in fakeroot
Date: Tue, 14 Jan 2014 02:00:03 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 83dfdd298d14d885b9ebc37b3b1af703cdd27f8c
Author: Justus Winter <address@hidden>
Date:   Sat Dec 7 15:50:46 2013 +0100

    trans: unlock nodes with faked attributes in fakeroot
    
    When a node has faked attributes, we cannot drop our node.
    Reinitialize the lock box as if the node was dropped.  This fixes the
    following bug:
    
    % fakeroot-hurd /bin/sh -c 'touch /tmp/$$.lock
                                chown 0 /tmp/$$.lock
                                l(){ flock /tmp/$$.lock true; }; l; l'
    <hangs>
    
    * trans/fakeroot.c (fake_node_dropweak): Unlock the node if the last
      real reference is dropped but we keep a fake one.
---
 trans/fakeroot.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 3756f48..920367d 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -172,6 +172,9 @@ fakeroot_netfs_release_protid (void *cookie)
         account for that fake reference.  */
       np->nn->faked |= FAKE_REFERENCE;
 
+      /* Clear the lock box as if the file was closed.  */
+      fshelp_lock_init (&np->userlock);
+
       /* We keep our node.  */
       goto out;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]