Commit 15220fb
Al Viro
fast_dput(): having ->d_delete() is not reason to delay refcount decrement
->d_delete() is a way for filesystem to tell that dentry is not worth
keeping cached. It is not guaranteed to be called every time a dentry
has refcount drop down to zero; it is not guaranteed to be called before
dentry gets evicted. In other words, it is not suitable for any kind
of keeping track of dentry state.
None of the in-tree filesystems attempt to use it that way, fortunately.
So the contortions done by fast_dput() (as well as dentry_kill()) are
not warranted. fast_dput() certainly should treat having ->d_delete()
instance as "can't assume we'll be keeping it", but that's not different
from the way we treat e.g. DCACHE_DONTCACHE (which is rather similar
to making ->d_delete() returns true when called).
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent cd9f84f commit 15220fb
1 file changed
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
| 771 | + | |
780 | 772 | | |
781 | 773 | | |
782 | 774 | | |
| |||
830 | 822 | | |
831 | 823 | | |
832 | 824 | | |
833 | | - | |
| 825 | + | |
834 | 826 | | |
835 | 827 | | |
836 | 828 | | |
| |||
0 commit comments