lkml.org 
[lkml]   [1997]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpatch for 2.1.63 fs/namei.c
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--- 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);
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.256 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site