<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/autofs, branch v5.7</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()</title>
<updated>2020-03-14T01:08:17+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2020-01-12T03:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=161aff1d93abf0e5b5e9dbca88928998c155f677'/>
<id>161aff1d93abf0e5b5e9dbca88928998c155f677</id>
<content type='text'>
New LOOKUP flag, telling path_lookupat() to act as path_mountpointat().
IOW, traverse mounts at the final point and skip revalidation of the
location where it ends up.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New LOOKUP flag, telling path_lookupat() to act as path_mountpointat().
IOW, traverse mounts at the final point and skip revalidation of the
location where it ends up.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-12-06T01:11:48+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-06T01:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b0d4beaa5a4b7d31070c41c2e50740304a3f1138'/>
<id>b0d4beaa5a4b7d31070c41c2e50740304a3f1138</id>
<content type='text'>
Pull autofs updates from Al Viro:
 "autofs misuses checks for -&gt;d_subdirs emptiness; the cursors are in
  the same lists, resulting in false negatives. It's not needed anyway,
  since autofs maintains counter in struct autofs_info, containing 0 for
  removed ones, 1 for live symlinks and 1 + number of children for live
  directories, which is precisely what we need for those checks.

  This series switches to use of that counter and untangles the crap
  around its uses (it needs not be atomic and there's a bunch of
  completely pointless "defensive" checks).

  This fell out of dcache_readdir work; the main point is to get rid of
  -&gt;d_subdirs abuses in there. I've more followup cleanups, but I hadn't
  run those by Ian yet, so they can go next cycle"

* 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  autofs: don't bother with atomics for ino-&gt;count
  autofs_dir_rmdir(): check ino-&gt;count for deciding whether it's empty...
  autofs: get rid of pointless checks around -&gt;count handling
  autofs_clear_leaf_automount_flags(): use ino-&gt;count instead of -&gt;d_subdirs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull autofs updates from Al Viro:
 "autofs misuses checks for -&gt;d_subdirs emptiness; the cursors are in
  the same lists, resulting in false negatives. It's not needed anyway,
  since autofs maintains counter in struct autofs_info, containing 0 for
  removed ones, 1 for live symlinks and 1 + number of children for live
  directories, which is precisely what we need for those checks.

  This series switches to use of that counter and untangles the crap
  around its uses (it needs not be atomic and there's a bunch of
  completely pointless "defensive" checks).

  This fell out of dcache_readdir work; the main point is to get rid of
  -&gt;d_subdirs abuses in there. I've more followup cleanups, but I hadn't
  run those by Ian yet, so they can go next cycle"

* 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  autofs: don't bother with atomics for ino-&gt;count
  autofs_dir_rmdir(): check ino-&gt;count for deciding whether it's empty...
  autofs: get rid of pointless checks around -&gt;count handling
  autofs_clear_leaf_automount_flags(): use ino-&gt;count instead of -&gt;d_subdirs
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs: fix a leak in autofs_expire_indirect()</title>
<updated>2019-10-25T04:03:11+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-10-25T04:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=03ad0d703df75c43f78bd72e16124b5b94a95188'/>
<id>03ad0d703df75c43f78bd72e16124b5b94a95188</id>
<content type='text'>
if the second call of should_expire() in there ends up
grabbing and returning a new reference to dentry, we need
to drop it before continuing.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if the second call of should_expire() in there ends up
grabbing and returning a new reference to dentry, we need
to drop it before continuing.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs: don't bother with atomics for ino-&gt;count</title>
<updated>2019-09-18T03:31:27+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T03:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=850d71acd52cd331474116fbd60cf8b3f3ded93e'/>
<id>850d71acd52cd331474116fbd60cf8b3f3ded93e</id>
<content type='text'>
All writers are serialized on inode-&gt;i_rwsem.  So are the readers
outside of expire.c.  And the readers in expire.c are in the
code that really doesn't care about narrow races - it's looking
for expiry candidates and its callers have to cope with the
possibility of a good candidate becoming busy right under them.

No point bothering with atomic operations - just use int and
mark the non-serialized readers with READ_ONCE().

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All writers are serialized on inode-&gt;i_rwsem.  So are the readers
outside of expire.c.  And the readers in expire.c are in the
code that really doesn't care about narrow races - it's looking
for expiry candidates and its callers have to cope with the
possibility of a good candidate becoming busy right under them.

No point bothering with atomic operations - just use int and
mark the non-serialized readers with READ_ONCE().

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs_dir_rmdir(): check ino-&gt;count for deciding whether it's empty...</title>
<updated>2019-09-18T03:28:08+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T03:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f'/>
<id>c3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs: get rid of pointless checks around -&gt;count handling</title>
<updated>2019-09-18T03:23:08+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T03:23:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=41ca19740a0e772eff1f9ba67293649feb836662'/>
<id>41ca19740a0e772eff1f9ba67293649feb836662</id>
<content type='text'>
* IS_ROOT can't be true for unlink or rmdir victim
* any positive autofs dentry has non-NULL autofs_dentry_ino()
* autofs symlink can't have -&gt;count other than 1
* autofs empty directory can't have -&gt;count other than 1

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* IS_ROOT can't be true for unlink or rmdir victim
* any positive autofs dentry has non-NULL autofs_dentry_ino()
* autofs symlink can't have -&gt;count other than 1
* autofs empty directory can't have -&gt;count other than 1

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs_clear_leaf_automount_flags(): use ino-&gt;count instead of -&gt;d_subdirs</title>
<updated>2019-09-18T02:16:58+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-09-18T02:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e509d6e9c1ab54af257d4ed95b30d41e3d786857'/>
<id>e509d6e9c1ab54af257d4ed95b30d41e3d786857</id>
<content type='text'>
We want to find out if the parent will become empty after we remove
the victim of rmdir().  Checking if the victim is the only element
of parent's -&gt;d_subdirs is completely wrong - e.g. opening the parent
will end up with a cursor added to its -&gt;d_parent and fooling the
check.

We do maintain ino-&gt;count - 0 for anything removed, 1 + number of
children for anything live.  Which gives us precisely what we need
for that check...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to find out if the parent will become empty after we remove
the victim of rmdir().  Checking if the victim is the only element
of parent's -&gt;d_subdirs is completely wrong - e.g. opening the parent
will end up with a cursor added to its -&gt;d_parent and fooling the
check.

We do maintain ino-&gt;count - 0 for anything removed, 1 + number of
children for anything live.  Which gives us precisely what we need
for that check...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs_lookup(): hold -&gt;d_lock over playing with -&gt;d_flags</title>
<updated>2019-07-27T14:03:14+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-07-27T14:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f68056ca50fdd3954a93ae66fea7452abddb66f'/>
<id>5f68056ca50fdd3954a93ae66fea7452abddb66f</id>
<content type='text'>
... as well as setting -&gt;d_fsdata, etc.  Make all of that
atomic.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... as well as setting -&gt;d_fsdata, etc.  Make all of that
atomic.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>get rid of autofs_info-&gt;active_count</title>
<updated>2019-07-27T14:00:33+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-07-27T14:00:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c4931db9b08c18005fb21ab201e7137ba0547df5'/>
<id>c4931db9b08c18005fb21ab201e7137ba0547df5</id>
<content type='text'>
autofs_add_active() is always called only once (and on a dentry
with freshly allocated ino, at that).  autofs_del_active() is
never called more than once.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
autofs_add_active() is always called only once (and on a dentry
with freshly allocated ino, at that).  autofs_del_active() is
never called more than once.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autofs: simplify get_next_positive_...(), get rid of trylocks</title>
<updated>2019-07-25T03:02:21+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-07-25T03:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ff09297ec9964b3fe4bade77c92c75fde34fa8e9'/>
<id>ff09297ec9964b3fe4bade77c92c75fde34fa8e9</id>
<content type='text'>
* new helper: positive_after(parent, child); parent-&gt;d_lock is
held by caller, grabs and returns the first thing after child
in the list of children that has simple_positive() true.  NULL
if nothing's found; NULL child == search the entire list.

* get_next_positive_subdir() loses the redundant check for
d_count and switches to use of that helper.  BTW, dput(NULL) is
a no-op for a good reason...

* get_next_positive_dentry() switched to the same helper.  Logics:
look for positive child in prev; if not found, look for the
positive child of prev's parent following prev, etc.  That way
we are guaranteed that we are only moving rootwards through the
ancestors of prev, which is pinned and thus not going anywhere.
Since -&gt;d_parent on autofs never changes, the same goes for
the entire chain of ancestors and we don't need overlapping
-&gt;d_lock on them.  Which avoids the trylock loops, in addition
to simplifying the logics in there...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* new helper: positive_after(parent, child); parent-&gt;d_lock is
held by caller, grabs and returns the first thing after child
in the list of children that has simple_positive() true.  NULL
if nothing's found; NULL child == search the entire list.

* get_next_positive_subdir() loses the redundant check for
d_count and switches to use of that helper.  BTW, dput(NULL) is
a no-op for a good reason...

* get_next_positive_dentry() switched to the same helper.  Logics:
look for positive child in prev; if not found, look for the
positive child of prev's parent following prev, etc.  That way
we are guaranteed that we are only moving rootwards through the
ancestors of prev, which is pinned and thus not going anywhere.
Since -&gt;d_parent on autofs never changes, the same goes for
the entire chain of ancestors and we don't need overlapping
-&gt;d_lock on them.  Which avoids the trylock loops, in addition
to simplifying the logics in there...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
