Skip to content

Commit ecf494d

Browse files
author
Nathan Memmott
committed
Support locking of directory entries
Moves the locking algorithm from file entry to file system entry. Fixes whatwg#137
1 parent 359fc4c commit ecf494d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ To <dfn for="file system entry">take a lock</dfn> with a |value| of
135135

136136
1. Let |lock| be the |entry|'s [=file system entry/lock=].
137137
1. Let |count| be the |entry|'s [=file system entry/shared lock count=].
138-
1. If |entry| is a [=directory entry=]:
139-
1. Let |descendantLockStatus| be the result of [=file system entry/lock/checking for a descendant lock=] on |entry|.
138+
1. If |entry| is a [=directory entry=]:
139+
1. Let |descendantLockStatus| be the result of [=file system entry/checking for a descendant lock=] on |entry|.
140140
1. If |descendantLockStatus| is "`taken`":
141141
1. Return "`failure`".
142142
1. If |value| is "`exclusive`":
@@ -158,15 +158,15 @@ Note: These steps have to be run on the [=file system queue=].
158158
</div>
159159

160160
<div algorithm>
161-
To <dfn for="file system entry/lock">check for a descendant lock</dfn> on a given
161+
To <dfn for="file system entry">check for a descendant lock</dfn> on a given
162162
[=directory entry=] |directory|:
163163

164164
1. [=set/For each=] |child| of |directory|'s [=directory entry/children=]:
165165
1. Let |lock| be the |child|'s [=file system entry/lock=].
166166
1. If |lock| is not "`open`":
167167
1. Return "`taken`".
168168
1. If |child| is a [=directory entry=]:
169-
1. Let |descendantLockStatus| be the result of [=file system entry/lock/checking for a descendant lock=] on |child|.
169+
1. Let |descendantLockStatus| be the result of [=file system entry/checking for a descendant lock=] on |child|.
170170
1. If |descendantLockStatus| is "`taken`":
171171
1. Return "`taken`".
172172
1. Return "`open`".

0 commit comments

Comments
 (0)