diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-12-08 17:55:14 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-12-09 15:07:59 +0100 |
commit | 672005782e57e049c7c8f4d6d0b2a80c0df512b4 (patch) | |
tree | fe3f27717b08bd49487bb5f62b012728c9994f29 | |
parent | 3688ec3ef963c8e41f845c1d98205ca69f91576b (diff) |
trans: fix locking issue in fakeroot
* trans/fakeroot.c (netfs_attempt_mkfile): Keep dir locked until the
new node is created.
-rw-r--r-- | trans/fakeroot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c index bee018e2..b97b499e 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; } |