summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/dir-lookup.c')
-rw-r--r--libdiskfs/dir-lookup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 272b8bd8..cba6347d 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
+#include <sys/file.h>
#include <hurd/fsys.h>
#include <hurd/paths.h>
@@ -409,10 +410,10 @@ diskfs_S_dir_lookup (struct protid *dircred,
if (! error)
{
if (flags & O_EXLOCK)
- error = fshelp_acquire_lock (&np->userlock, &po->lock_status,
+ error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
&np->lock, LOCK_EX);
else if (flags & O_SHLOCK)
- error = fshelp_acquire_lock (&np->userlock, &po->lock_status,
+ error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
&np->lock, LOCK_SH);
}