]> git.ipfire.org Git - thirdparty/coreutils.git/commit
rm: improve efficiency of rm -r (without -f) from O(N^2) to O(N)
authorJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 13:15:09 +0000 (15:15 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 11 Sep 2009 12:08:58 +0000 (14:08 +0200)
commit722287e443c93e04e724e2812857a395cfab0b60
tree6513b8c652ab59cd12c79fe722930a3ce5f73978
parent9966c92dd4851db611ad88fc1eb68b01fffcaea3
rm: improve efficiency of rm -r (without -f) from O(N^2) to O(N)

where N is the depth of the deepest hierarchy rm is processing.
* src/remove.c (write_protected_non_symlink): Use faccessat to
avoid O(N)-per-entry cost of calling euidaccess.
* m4/jm-macros.m4 (coreutils_MACROS): Check for faccessat.
* NEWS (Improvements): Mention it.
NEWS
m4/jm-macros.m4
src/remove.c