[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/13] trans: fix locking issue in fakeroot
From: |
Justus Winter |
Subject: |
[PATCH 06/13] trans: fix locking issue in fakeroot |
Date: |
Mon, 9 Dec 2013 15:16:34 +0100 |
* trans/fakeroot.c (netfs_attempt_mkfile): Keep dir locked until the
new node is created.
---
trans/fakeroot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index bee018e..b97b499 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -614,9 +614,9 @@ netfs_attempt_mkfile (struct iouser *user, struct node *dir,
file_t newfile;
error_t err = dir_mkfile (dir->nn->file, O_RDWR|O_EXEC,
real_from_fake_mode (mode), &newfile);
- pthread_mutex_unlock (&dir->lock);
if (err == 0)
err = new_node (newfile, MACH_PORT_NULL, 0, O_RDWR|O_EXEC, np);
+ pthread_mutex_unlock (&dir->lock);
return err;
}
--
1.7.10.4
- More fixes for fakeroot-hurd, Justus Winter, 2013/12/09
- [PATCH 02/13] libihash: remove dead code, Justus Winter, 2013/12/09
- [PATCH 01/13] libfshelp: use a hash table in get-identity.c, Justus Winter, 2013/12/09
- [PATCH 03/13] trans: fix the use of the hash table in fakeroot.c, Justus Winter, 2013/12/09
- [PATCH 04/13] trans: improve the performance of dir_lookup in fakeroot, Justus Winter, 2013/12/09
- [PATCH 06/13] trans: fix locking issue in fakeroot,
Justus Winter <=
- [PATCH 07/13] trans: return nodes locked when creating fake nodes in fakeroot, Justus Winter, 2013/12/09
- [PATCH 08/13] trans: fix reference counting and destruction of fake nodes, Justus Winter, 2013/12/09
- [PATCH 11/13] trans: improve the error handling in fakeauth, Justus Winter, 2013/12/09
- [PATCH 09/13] trans: fix locking in fakeroot's netfs_S_dir_lookup, Justus Winter, 2013/12/09