diff options
| author | Jim Meyering <meyering@redhat.com> | 2009-02-11 12:26:14 +0100 |
|---|---|---|
| committer | Jim Meyering <meyering@redhat.com> | 2009-02-13 18:41:01 +0100 |
| commit | 982504452d60a87632a5a2f11d1be645e06d8346 (patch) | |
| tree | 648357f7b4178fc1f11aa4f1f1d4052eccbac25c /src/chmod.c | |
| parent | maint: mention how to run a single test in HACKING docs (diff) | |
| download | coreutils-982504452d60a87632a5a2f11d1be645e06d8346.tar.gz coreutils-982504452d60a87632a5a2f11d1be645e06d8346.zip | |
du,chgrp,chmod,chown: use FTS_DEFER_STAT
* src/du.c (main): Use FTS_DEFER_STAT, for better locality of inode
reference. Important when traversing file systems with fake inodes.
* src/chgrp.c (main): Likewise.
* src/chmod.c (main): Likewise.
* src/chown.c (main): Likewise.
The only remaining fts client, chcon, doesn't need this, since it goes
further and uses FTS_NOSTAT, which suppresses all non- directory
stat calls.
Diffstat (limited to 'src/chmod.c')
| -rw-r--r-- | src/chmod.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chmod.c b/src/chmod.c index 8c5cc3e49..91dfbc3aa 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -1,5 +1,5 @@ /* chmod -- change permission modes of files - Copyright (C) 89, 90, 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 89, 90, 91, 1995-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -534,7 +534,8 @@ main (int argc, char **argv) root_dev_ino = NULL; } - ok = process_files (argv + optind, FTS_COMFOLLOW | FTS_PHYSICAL); + ok = process_files (argv + optind, + FTS_COMFOLLOW | FTS_PHYSICAL | FTS_DEFER_STAT); exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } |
