From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: Mon, 28 Jul 97 11:01:25 +0200
To: linux-kernel@vger.rutgers.edu, torvalds@transmeta.com (Linus Torvalds)
Cc: linux-m68k@phil.uni-sb.de
Subject: L68K: dcache reference leak in 2.1.47
X-Yow: Spreading peanut butter reminds me of opera!!  I wonder why?
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

When sys_symlink fails with EEXIST it leaks a reference on the dentry for
the new name.

--- linux-2.1.47/fs/namei.c.~11~	Fri Jul 25 21:13:39 1997
+++ linux-2.1.47/fs/namei.c	Sat Jul 26 13:24:04 1997
@@ -904,7 +904,7 @@
 
 	error = -EEXIST;
 	if (dentry->d_inode)
-		goto exit;
+		goto exit_dput;
 
 	dir = lock_parent(dentry);
 
@@ -926,6 +926,7 @@
 
 exit_lock:
 	up(&dir->i_sem);
+exit_dput:
 	dput(dentry);
 exit:
 	return error;

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
