From d4a22dff9b4cd8b05cb01e654fa84b189d3b5721 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Fri, 18 Sep 2015 13:29:17 +0200 Subject: du: avoid to stat all mount points if possible du calls stat for each mount point at startup. This would block or even make du fail if stat for an unrelated mount point hangs. The result is not needed in the normal case anyway and therefore should be avoided. Issue introduced in commit v8.19-2-gcf7e1b5. * src/du.c (fill_mount_table): Move function up as it's not used ... (mount_point_in_fts_cycle): ... here, i.e., the DI_MNT set is initialized and filled only iff FTS has detected a directory cycle. (main): Remove the initialization and filling of the DI_MNT set here, and free the DI_MNT set only if it was used. --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 33414c4eb..63574da2d 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,12 @@ GNU coreutils NEWS -*- outline -*- base64 no longer supports hex or oct --wrap parameters, thus better supporting decimals with leading zeros. +** Improvements + + du no longer stats all mount points at startup, only doing so + upon detection of a directory cycle. + [issue introduced in coreutils-8.20] + * Noteworthy changes in release 8.24 (2015-07-03) [stable] -- cgit v1.2.3-70-g09d2