Re: [PATCH] Add a refcount check in dput()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Saturday, September 15, 2007 - 1:39 am

On Mon, 10 Sep 2007 15:13:19 -0700 (PDT) menage@google.com (Paul Menage) wrote:


eek, much too aggressive.

I added this:

--- a/fs/dcache.c~add-a-refcount-check-in-dput
+++ a/fs/dcache.c
@@ -176,6 +176,7 @@ void dput(struct dentry *dentry)
 	if (!dentry)
 		return;
 
+	WARN_ON_ONCE(!atomic_read(&dentry->d_count));
 repeat:
 	if (atomic_read(&dentry->d_count) == 1)
 		might_sleep();
_

to the -mm-only-debugging-patches section of the -mm tree.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Add a refcount check in dput(), Paul Menage, (Mon Sep 10, 3:13 pm)
Re: [PATCH] Add a refcount check in dput(), Andrew Morton, (Sat Sep 15, 1:39 am)
Re: [PATCH] Add a refcount check in dput(), Paul Menage, (Mon Sep 17, 11:21 am)
Re: [PATCH] Add a refcount check in dput(), Andrew Morton, (Mon Sep 17, 1:48 pm)