Re: [PATCH] AFFS fix return without releasing BKL

From: Dave Hansen (haveblue@us.ibm.com)
Date: Fri Jul 12 2002 - 14:06:45 EST


Roman Zippel wrote:
> Hi,
>
> On Thu, 11 Jul 2002, Dave Hansen wrote:
>
>>This was found by Dan Carpenter <error27@email.com>, using an smatch
>>script. Looks to me like like an error caused during all the BKL
>>pushing. 1 more coming...
>
> Actually lock_kernel() and the test there can be removed completely.

Patch attached to do just that.

-- 
Dave Hansen
haveblue@us.ibm.com

--- linux-2.5.25-clean/fs/affs/namei.c Thu Jun 20 15:53:49 2002 +++ linux/fs/affs/namei.c Fri Jul 12 12:05:24 2002 @@ -342,14 +342,7 @@ pr_debug("AFFS: rmdir(dir=%u, \"%.*s\")\n", (u32)dir->i_ino, (int)dentry->d_name.len, dentry->d_name.name); - lock_kernel(); - - /* WTF??? */ - if (!dentry->d_inode) - return -ENOENT; - res = affs_remove_header(dentry); - unlock_kernel(); return res; }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:23 EST