public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@sw.ru>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Jan Blunck <jblunck@suse.de>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Cc: devel@openvz.org
Subject: [PATCH 2.6.19-rc3] VFS: extra check inside dentry_unhash()
Date: Wed, 01 Nov 2006 13:37:33 +0300	[thread overview]
Message-ID: <454878ED.1080405@sw.ru> (raw)

From:	Vasily Averin <vvs@sw.ru>

d_count check after dget() is always true

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

--- linux-2.6.19-rc3-mm1/fs/namei.c.duhsh	2006-10-30 14:20:19.000000000 +0300
+++ linux-2.6.19-rc3-mm1/fs/namei.c	2006-11-01 13:17:17.000000000 +0300
@@ -1993,8 +1993,7 @@ asmlinkage long sys_mkdir(const char __u
 void dentry_unhash(struct dentry *dentry)
 {
 	dget(dentry);
-	if (atomic_read(&dentry->d_count))
-		shrink_dcache_parent(dentry);
+	shrink_dcache_parent(dentry);
 	spin_lock(&dcache_lock);
 	spin_lock(&dentry->d_lock);
 	if (atomic_read(&dentry->d_count) == 2)



                 reply	other threads:[~2006-11-01 10:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=454878ED.1080405@sw.ru \
    --to=vvs@sw.ru \
    --cc=akpm@osdl.org \
    --cc=devel@openvz.org \
    --cc=jblunck@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --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