summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-lookup.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-12 02:42:18 +0000
committerMiles Bader <miles@gnu.org>1996-10-12 02:42:18 +0000
commit4e64ca6e48b1c88d42becaa8441d747d39fee200 (patch)
treeda2ea4bf732b7c7171e6bb8f6ea6a8977809c8c1 /libdiskfs/dir-lookup.c
parentc39f4cc7ea022ba99a19d89ff6f22f703fc0b4db (diff)
(diskfs_S_dir_lookup):
Temporarily add O_EXLOCK and O_SHLOCK to the set of retained flags, until they get added to O_HURD. Turn off OPENONLY_STATE_MODES bits in the flags we pass to diskfs_make_peropen, not everything *but* them!
Diffstat (limited to 'libdiskfs/dir-lookup.c')
-rw-r--r--libdiskfs/dir-lookup.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index fa4db753..fb5b768e 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -61,8 +61,9 @@ diskfs_S_dir_lookup (struct protid *dircred,
if (!dircred)
return EOPNOTSUPP;
- flags &= O_HURD;
-
+ /* XXX - EXLOCK & SHLOCK are temporary until they get added to O_HURD. */
+ flags &= O_HURD | O_EXLOCK | O_SHLOCK;
+
create = (flags & O_CREAT);
excl = (flags & O_EXCL);
@@ -399,13 +400,13 @@ diskfs_S_dir_lookup (struct protid *dircred,
if ((flags & O_NOATIME) && (diskfs_isowner (np, dircred) == EPERM))
flags &= ~O_NOATIME;
- error = diskfs_create_protid (diskfs_make_peropen (np,
- (flags
- & OPENONLY_STATE_MODES),
- dircred->po->dotdotport),
- dircred->uids, dircred->nuids,
- dircred->gids, dircred->ngids,
- &newpi);
+ error =
+ diskfs_create_protid (diskfs_make_peropen (np,
+ (flags &~OPENONLY_STATE_MODES),
+ dircred->po->dotdotport),
+ dircred->uids, dircred->nuids,
+ dircred->gids, dircred->ngids,
+ &newpi);
if (! error)
{