patch for 2.1.63 fs/namei.c

Bill Hawes (whawes@star.net)
Sun, 16 Nov 1997 12:08:48 -0500


This is a multi-part message in MIME format.
--------------B92DE582238DFB4F829D1D6C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The attached patch fixes a leaked dentry in fs/namei.c. This was
causing busy devices at umount time if any lookups had failed on the
device.

Regards,
Bill
--------------B92DE582238DFB4F829D1D6C
Content-Type: text/plain; charset=us-ascii; name="namei_63-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="namei_63-patch"

--- fs/namei.c.old Wed Nov 12 17:33:10 1997
+++ fs/namei.c Sun Nov 16 12:58:31 1997
@@ -235,9 +235,11 @@
result = ERR_PTR(-ENOMEM);
if (dentry) {
int error = dir->i_op->lookup(dir, dentry);
- result = ERR_PTR(error);
- if (!error)
- result = dentry;
+ result = dentry;
+ if (error) {
+ dput(dentry);
+ result = ERR_PTR(error);
+ }
}
}
up(&dir->i_sem);

--------------B92DE582238DFB4F829D1D6C--