Subject: [wrecked] add-a-refcount-check-in-dput.patch removed from -mm tree To: menage@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 29 Aug 2013 12:05:05 -0700 The patch titled Subject: add a refcount check in dput() has been removed from the -mm tree. Its filename was add-a-refcount-check-in-dput.patch This patch was dropped because other changes were merged, which wrecked this patch ------------------------------------------------------ From: Paul Menage <menage@xxxxxxxxxx> Subject: add a refcount check in dput() Add a WARN_ON_ONCE() to check for passing an unreferenced dentry to dput(). This is analogous to the similar check in dget(), and will make reference-counting bugs in filesystems more immediately obvious. (I just spent a while debugging an oops that turned out to be due to broken fs reference counting.) Signed-off-by: Paul Menage <menage@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/dcache.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/dcache.c~add-a-refcount-check-in-dput fs/dcache.c --- a/fs/dcache.c~add-a-refcount-check-in-dput +++ a/fs/dcache.c @@ -521,6 +521,7 @@ void dput(struct dentry *dentry) if (!dentry) return; + WARN_ON_ONCE(!dentry->d_count); repeat: if (dentry->d_count == 1) might_sleep(); _ Patches currently in -mm which might be from menage@xxxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html