Lines Matching full:we
10 When taking the i_rwsem on multiple non-directory objects, we
11 always acquire the locks in order by increasing address. We'll call
22 * lock the directory we are accessing (shared)
26 * lock the directory we are accessing (exclusive)
73 in its own right; it may happen as part of lookup. We speak of the
74 operations on directory trees, but we obviously do not have the full
75 picture of those - especially for network filesystems. What we have
77 Trees grow as we do operations; memory pressure prunes them. Normally
78 that's not a problem, but there is a nasty twist - what should we do
83 possibility that directory we see in one place gets moved by the server
84 to another and we run into it when we do a lookup.
86 For a lot of reasons we want to have the same directory present in dcache
90 a root of separate tree, it gets attached to the directory we are doing a
91 lookup in, under the name we'd been looking for. If the alias is already
92 a child of the directory we are looking in, it changes name to the one
93 we'd been looking for. No extra locking is involved in these two cases.
95 First of all, we verify that it is *not* an ancestor of our directory
96 and fail the lookup if it is. Then we try to lock the filesystem and the
97 current parent of the alias. If either trylock fails, we fail the lookup.
98 If trylocks succeed, we detach the alias from its current parent and
99 attach to our directory, under the name we are looking for.
102 all we change is the view in dcache. Moreover, holding a directory locked
110 step in cross-directory renames; we need to be careful when checking if
149 For example, if we have NFS filesystem caching on a local one, we have
170 Moreover, without loss of generality we can assume that all operations
174 In other words, we have a cycle of threads, T1,..., Tn,
193 we would have Dn a parent of D1, which is a parent of D2, which is
197 we would have a loop.
201 generality we can assume that T1 is the one doing a cross-directory
204 In other words, we have a cross-directory rename that locked
224 It can't be a parent and its child; otherwise we would've had
241 suppose the parents are initially in different trees; we would lock the
244 descendent of the parent of target. At that point we have cross-directory
248 the locks) and voila - we have a deadlock.
264 not have passed through the node itself, or we would've had a loop before
273 ancestors of that parent. But as we have just shown, that chain must
284 children", so if we are going to introduce hybrid objects we will need