lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectlinux-next: manual merge of the akpm tree with Linus' tree
Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in fs/dcache.c
between commit 98474236f72e ("vfs: make the dentry cache use the lockref
infrastructure") from Linus' tree and commit "dcache: remove dentries
from LRU before putting on dispose list" from the akpm tree.

I fixed it up (I think - please check, see below and also check the final
result when I publish) and can carry the fix as necessary (no action is
required).

I also added this fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Aug 2013 18:38:42 +1000
Subject: [PATCH] dcache: fix up for lockref changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
fs/dcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 58c5e4b..39939f1 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -837,7 +837,7 @@ dentry_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
* counts, just remove them from the LRU. Otherwise give them
* another pass through the LRU.
*/
- if (dentry->d_count) {
+ if (dentry->d_lockref.count) {
list_del_init(&dentry->d_lru);
spin_unlock(&dentry->d_lock);
return LRU_REMOVED;
--
1.8.4.rc3
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc fs/dcache.c
index 0fe810f,f5f8924..0000000
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@@ -780,10 -801,15 +794,11 @@@ static struct dentry * try_prune_one_de
/* Prune ancestors. */
dentry = parent;
while (dentry) {
- spin_lock(&dentry->d_lock);
- if (dentry->d_count > 1) {
- dentry->d_count--;
- spin_unlock(&dentry->d_lock);
+ if (lockref_put_or_lock(&dentry->d_lockref))
- return;
- dentry = dentry_kill(dentry, 1);
+ return NULL;
- }
+ dentry = dentry_kill(dentry, 1, 1);
}
+ return NULL;
}
static void shrink_dentry_list(struct list_head *list)
@@@ -802,12 -828,18 +817,18 @@@
}
/*
+ * The dispose list is isolated and dentries are not accounted
+ * to the LRU here, so we can simply remove it from the list
+ * here regardless of whether it is referenced or not.
+ */
+ list_del_init(&dentry->d_lru);
+ dentry->d_flags &= ~DCACHE_SHRINK_LIST;
+
+ /*
* We found an inuse dentry which was not removed from
- * the LRU because of laziness during lookup. Do not free
- * it - just keep it off the LRU list.
+ * the LRU because of laziness during lookup. Do not free it.
*/
- if (dentry->d_count) {
+ if (dentry->d_lockref.count) {
- dentry_lru_del(dentry);
spin_unlock(&dentry->d_lock);
continue;
}[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-08-30 22:41    [W:0.040 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site