commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 42/87: libdiskfs: fix deadlock


From: Samuel Thibault
Subject: [hurd] 42/87: libdiskfs: fix deadlock
Date: Sun, 09 Nov 2014 11:05:02 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 38d064eab719b8334144094d6499c24718a255c1
Author: Justus Winter <address@hidden>
Date:   Sun Jun 22 14:48:34 2014 +0200

    libdiskfs: fix deadlock
    
    Previously, libdiskfs would deadlock on contention on renamedirlock
    due to the lock being taken spuriously.
    
    Found using fsstress from the Linux Test Project.
    
    * libdiskfs/dir-rename.c (diskfs_S_dir_rename): Remove spurious
    pthread_mutex_lock.
---
 libdiskfs/dir-rename.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index ff9dead..9ac4839 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -77,7 +77,6 @@ diskfs_S_dir_rename (struct protid *fromcred,
       if (pthread_mutex_trylock (&renamedirlock))
        {
          diskfs_nrele (fnp);
-         pthread_mutex_lock (&renamedirlock);
          goto try_again;
        }
       err = diskfs_rename_dir (fdp, fnp, fromname, tdp, toname, fromcred,

-- 
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]