From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org
Cc: sage@inktank.com, viro@zeniv.linux.org.uk, "Yan,
Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH 2/2] fs: fix dentry_lru_prune()
Date: Thu, 7 Mar 2013 19:37:36 +0800 [thread overview]
Message-ID: <1362656256-4397-1-git-send-email-zheng.z.yan@intel.com> (raw)
From: "Yan, Zheng" <zheng.z.yan@intel.com>
dentry_lru_prune() should always call file system's d_prune callback.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
fs/dcache.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 19153a0..f0060aa 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -344,14 +344,9 @@ static void dentry_lru_del(struct dentry *dentry)
*/
static void dentry_lru_prune(struct dentry *dentry)
{
- if (!list_empty(&dentry->d_lru)) {
- if (dentry->d_flags & DCACHE_OP_PRUNE)
- dentry->d_op->d_prune(dentry);
-
- spin_lock(&dcache_lru_lock);
- __dentry_lru_del(dentry);
- spin_unlock(&dcache_lru_lock);
- }
+ if (dentry->d_flags & DCACHE_OP_PRUNE)
+ dentry->d_op->d_prune(dentry);
+ dentry_lru_del(dentry);
}
static void dentry_lru_move_list(struct dentry *dentry, struct list_head *list)
--
1.7.11.7
next reply other threads:[~2013-03-07 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 11:37 Yan, Zheng [this message]
2013-03-08 2:04 ` [PATCH 2/2] fs: fix dentry_lru_prune() Dave Chinner
2013-03-08 2:43 ` Yan, Zheng
2013-03-08 6:27 ` Dave Chinner
2013-03-08 6:40 ` Yan, Zheng
2013-03-09 9:35 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362656256-4397-1-git-send-email-zheng.z.yan@intel.com \
--to=zheng.z.yan@intel.com \
--cc=ceph-devel@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sage@inktank.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).