diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-22 14:48:34 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-23 14:16:09 +0200 |
commit | 38d064eab719b8334144094d6499c24718a255c1 (patch) | |
tree | ef5a944e4e21fe11ec70c5129645425cce43a404 /libdiskfs | |
parent | 97707c7b564381f0cdf683c77a6450434cb9b556 (diff) |
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.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/dir-rename.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c index ff9dead0..9ac48398 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, |