[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 14/21: libnetfs: fix file locking on peropen release
From: |
Samuel Thibault |
Subject: |
[hurd] 14/21: libnetfs: fix file locking on peropen release |
Date: |
Tue, 04 Feb 2014 17:25:28 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit b8c728ec51696c5d17ef09a00b3b193b70a487da
Author: Richard Braun <address@hidden>
Date: Sun Jan 26 23:14:35 2014 +0100
libnetfs: fix file locking on peropen release
* libnetfs/release-peropen.c (netfs_release_peropen): Release the lock on
the underlying node if the peropen status indicates it's not unlocked.
---
libnetfs/release-peropen.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libnetfs/release-peropen.c b/libnetfs/release-peropen.c
index d4d3574..c206b43 100644
--- a/libnetfs/release-peropen.c
+++ b/libnetfs/release-peropen.c
@@ -18,6 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#include <sys/file.h>
#include "netfs.h"
void
@@ -39,6 +40,10 @@ netfs_release_peropen (struct peropen *po)
if (po->shadow_root_parent)
mach_port_deallocate (mach_task_self (), po->shadow_root_parent);
+ if (po->lock_status != LOCK_UN)
+ fshelp_acquire_lock (&po->np->userlock, &po->lock_status,
+ &po->np->lock, LOCK_UN);
+
netfs_nput (po->np);
free (po->path);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 19/21: Fix crash on fsysopts when pfinet has no IPv6, (continued)
- [hurd] 19/21: Fix crash on fsysopts when pfinet has no IPv6, Samuel Thibault, 2014/02/04
- [hurd] 09/21: pfinet: include the mig-generated server headers in main.c, Samuel Thibault, 2014/02/04
- [hurd] 03/21: trans: fix the receiver lookup in password, Samuel Thibault, 2014/02/04
- [hurd] 10/21: pflocal: include the mig-generated server headers, Samuel Thibault, 2014/02/04
- [hurd] 07/21: exec: include the mig-generated server headers in main.c, Samuel Thibault, 2014/02/04
- [hurd] 02/21: Rename variables with the name "error" to "err"., Samuel Thibault, 2014/02/04
- [hurd] 20/21: daemons/getty: display /etc/issue if available, Samuel Thibault, 2014/02/04
- [hurd] 01/21: libps: fix task/thread times fetching, Samuel Thibault, 2014/02/04
- [hurd] 11/21: auth: include the mig-generated server headers in auth.c, Samuel Thibault, 2014/02/04
- [hurd] 18/21: pfinet: really deallocate device port, Samuel Thibault, 2014/02/04
- [hurd] 14/21: libnetfs: fix file locking on peropen release,
Samuel Thibault <=