mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Q] missing unused dentry in prune_dcache()?
@ 2006-10-25 12:30 Vasily Averin
  2006-10-25 13:51 ` David Howells
                   ` (5 more replies)
  0 siblings, 6 replies; 44+ messages in thread
From: Vasily Averin @ 2006-10-25 12:30 UTC (permalink / raw)
  To: Neil Brown, Jan Blunck, Olaf Hering, Balbir Singh, David Howells,
	Kirill Korotaev, Linux Kernel Mailing List, devel, Andrew Morton

Hello folks,

I would like to ask you clarify me one question in the the following patch:
http://linux.bkbits.net:8080/linux-2.6/gnupatch@449b144ecSF1rYskg3q-SeR2vf88zg
# ChangeSet
#   2006/06/22 15:05:57-07:00 neilb@suse.de
#   [PATCH] Fix dcache race during umount

#   If prune_dcache finds a dentry that it cannot free, it leaves it where it
#   is (at the tail of the list) and exits, on the assumption that some other
#   thread will be removing that dentry soon.

However as far as I see this comment is not correct: when we cannot take
s_umount rw_semaphore (for example because it was taken in do_remount) this
dentry is already extracted from dentry_unused list and we do not add it into
the list again. Therefore dentry will not be found by prune_dcache() and
shrink_dcache_sb() and will leave in memory very long time until the partition
will be unmounted.

Am I probably err?

The patch adds this dentry into tail of the dentry_unused list.

Signed-off-by:	Vasily Averin <vvs@sw.ru>

--- linux-2.6.19-rc3/fs/dcache.c.prdch	2006-10-25 16:09:19.000000000 +0400
+++ linux-2.6.19-rc3/fs/dcache.c	2006-10-25 16:08:20.000000000 +0400
@@ -477,6 +477,8 @@ static void prune_dcache(int count, stru
 			}
 			up_read(s_umount);
 		}
+ 		list_add_tail(&dentry->d_lru, &dentry_unused);
+		dentry_stat.nr_unused++;
 		spin_unlock(&dentry->d_lock);
 		/* Cannot remove the first dentry, and it isn't appropriate
 		 * to move it to the head of the list, so give up, and try

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2006-11-14  9:32 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25 12:30 [Q] missing unused dentry in prune_dcache()? Vasily Averin
2006-10-25 13:51 ` David Howells
2006-10-25 13:58   ` Vasily Averin
2006-10-25 14:23   ` David Howells
2006-10-26 11:36     ` Vasily Averin
2006-10-26 13:25     ` David Howells
2006-10-27  8:05       ` Vasily Averin
2006-10-27 10:42       ` David Howells
2006-10-27 11:50         ` Vasily Averin
2006-10-27 12:11         ` David Howells
2006-10-27 13:47           ` Vasily Averin
2006-10-27 14:05           ` [PATCH 2.6.19-rc3] VFS: per-sb dentry lru list Vasily Averin
2006-10-27 18:06             ` Andrew Morton
2006-10-30 14:24               ` Vasily Averin
2006-10-30 15:08                 ` Eric Dumazet
2006-10-30 15:34                   ` Kirill Korotaev
2006-10-30 16:09                     ` Eric Dumazet
2006-10-30 15:14               ` Kirill Korotaev
2006-10-30  4:24             ` David Chinner
2006-10-30  6:28               ` [Devel] " Kirill Korotaev
2006-10-31  4:38                 ` Neil Brown
2006-10-31 13:08                   ` Vasily Averin
2006-11-01 10:55                   ` [Devel] " Kirill Korotaev
2006-11-14  4:51                     ` Neil Brown
2006-11-14  9:29                     ` David Howells
2006-10-31 10:40                 ` David Howells
2006-11-01  6:32                   ` Neil Brown
2006-11-01 13:32                     ` Vasily Averin
2006-11-14  5:44                       ` Neil Brown
2006-11-14  6:12                         ` Vasily Averin
2006-10-27 14:29           ` [Q] missing unused dentry in prune_dcache()? David Howells
2006-10-27 14:39             ` Kirill Korotaev
2006-10-27 13:42     ` [PATCH 2.6.19-rc3] VFS: missing unused dentry in prune_dcache() Vasily Averin
2006-10-27 14:24     ` David Howells
2006-10-26 11:49 ` [Q] missing unused dentry in prune_dcache()? Vasily Averin
2006-10-26 12:33 ` David Howells
2006-10-26 13:23 ` David Howells
2006-10-26 13:58   ` Vasily Averin
2006-10-26 14:07   ` David Howells
2006-10-27  6:32   ` Vasily Averin
2006-10-27  6:50     ` Vasily Averin
2006-10-27  9:36     ` David Howells
2006-10-31 13:24 ` [Q] missing ->d_delete() in shrink_dcache_for_umount()? Vasily Averin
2006-10-31 15:06 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome