lkml.org 
[lkml]   [2020]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/11] fs/dcache: Simplify __dentry_kill()
Date
Use the new d_in_lru() helper function to simplify __dentry_kill() a bit.

Signed-off-by: Waiman Long <longman@redhat.com>
---
fs/dcache.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index c17b538bf41c..a977f9e05840 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -572,10 +572,9 @@ static void __dentry_kill(struct dentry *dentry)
if (dentry->d_flags & DCACHE_OP_PRUNE)
dentry->d_op->d_prune(dentry);

- if (dentry->d_flags & DCACHE_LRU_LIST) {
- if (!(dentry->d_flags & DCACHE_SHRINK_LIST))
- d_lru_del(dentry);
- }
+ if (d_in_lru(dentry))
+ d_lru_del(dentry);
+
/* if it was on the hash then remove it */
__d_drop(dentry);
dentry_unlist(dentry, parent);
--
2.18.1
\
 
 \ /
  Last update: 2020-02-26 17:15    [W:0.147 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site