]> 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>
Sat, 5 Sep 2009 14:28:46 +0000 (16:28 +0200)
commit0f3f7d495c82b8b07945830314456ee0bfe3bf73
treee4f196def64b08f037235baf4bf0fb92bab45ea2
parent4f87cc0364cd23569437f8a65933bd6078bed4b9
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.
m4/jm-macros.m4
src/remove.c