diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2026-04-12 21:17:52 +0300 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2026-06-05 07:34:55 +0300 |
| commit | f601ede8fd166f8f2c84db427b94f80f1b0cbab1 (patch) | |
| tree | cb25410e2aaddb83eddfe4ed2d4a896bcc2269ac | |
| parent | 87e801e1678342fc23b1eb92c0eecedf5dca79cb (diff) | |
| download | linux-f601ede8fd166f8f2c84db427b94f80f1b0cbab1.tar.xz | |
select_collect(): ignore dentries on shrink lists if they have positive refcounts
If all dentries we find have positive refcounts and some happen
to be on shrink lists, there's no point trying to steal them in the
select_collect2() phase - we won't be able to evict any of them. Busy on
shrink lists is still busy...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | fs/dcache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index fa12e18906b9..40031b806b73 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1589,9 +1589,7 @@ static enum d_walk_ret select_collect(void *_data, struct dentry *dentry) if (data->start == dentry) goto out; - if (dentry->d_flags & DCACHE_SHRINK_LIST) { - data->found++; - } else if (!dentry->d_lockref.count) { + if (!dentry->d_lockref.count) { to_shrink_list(dentry, &data->dispose); data->found++; } else if (dentry->d_lockref.count < 0) { |
