diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-20 00:26:14 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-20 00:26:14 -0700 |
| commit | 0e3efbd1ebf9b6f6b16cd5b68465f02dbe72dff0 (patch) | |
| tree | 3129a22f04ba3de1ff9f767f822b3dea4dfd5e01 /kernel | |
| parent | de8e3749bfc54556c3b9a40534fc2d3309ec84e6 (diff) | |
[PATCH] Fix and clean up DCACHE_REFERENCED usage
From: Maneesh Soni <maneesh@in.ibm.com>
This patch changes the way DCACHE_REFERENCED flag is used. It
got messed up in dcache_rcu iterations. I hope this will be ok now.
The flag was meant to be advisory flag which is used while
prune_dcache() so as not to free dentries which have recently
entered d_lru list. At first pass in prune_dcache the dentries
marked DCACHE_REFERENCED are left with the flag reset. and they
are freed in the next pass.
So, now we mark the dentry as DCACHE_REFERENCED when it is first
entering the d_lru list in dput() and resetthe flag in prune_dcache().
If the flag remains reset in the next call to prune_dcache(), the
dentry is then freed.
Also I don't think any file system have to use this flag as it is taken
care by the dcache layer. The patch removes such code from a few of file
systems. Moreover these filesystems were anyway doing worng thing as they
were changing the flag out of dcache_lock.
Changes:
o dput() marks dentry DCACHE_REFERENCED when it is added to the dentry_unused
list
o no need to set the flag in dget, dget_locked, d_lookup as these guys anyway
increments the ref count.
o check the ref count in prune_dcache and use DCACHE_REFERENCED flag just for
two stage aging.
o remove code for setting DACACHE_REFERENCED from reiserfs, fat, xfs and
exportfs.
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
