Revert "rm-rf: Make sure we rewinddir() before readdir()"
This reverts commit 6bbb893b90.
Let's try a different approach where we make sure that all callers only pass in
a fd that is "clean", i.e. at offset 0. The majority of callers of this function
(both direct and indirect) pass a freshly-opened fd, so the rewind call is not
needed.
This commit is contained in:
@@ -365,10 +365,6 @@ static int rm_rf_children_impl(
|
||||
strna(path));
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure we reset the iterator since we don't know the state the passed in file
|
||||
* descriptor is in. */
|
||||
rewinddir(d);
|
||||
}
|
||||
|
||||
FOREACH_DIRENT_ALL(de, d, return -errno) {
|
||||
|
||||
Reference in New Issue
Block a user