remove unneeded inode semaphores from driverfs
PATCH 1/1 remove unneeded inode semaphores from driverfs
Hi,
__remove_file() in driverfs/inode.c calls down(&dentry->d_inode->i_sem) before calling vfs_unlink(dentry->d_parent->d_inode,dentry) which tries to claim the same semaphore causing the livelock. driverfs_remove_dir() makes the same calling vfs_rmdir().
These bugs are triggered by driverfs for IDE patch by Pavel Machek.
Best regards.
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: wwwkeys.eu.pgp.net
linux/fs/driverfs/inode.c renamed from linux.vanilla/fs/driverfs/inode.c +0 -4
@@ -698,11 +698,9 @@static void __remove_file (struct dentry * dentry) {dget (dentry); -down (&dentry->d_inode->i_sem);vfs_unlink (dentry->d_parent->d_inode,dentry); -up (&dentry->d_inode->i_sem);dput (dentry);/* remove reference count from when file was created */
@@ -766,7 +764,6 @@ dentry =dget (dir->dentry);dget (dentry->d_parent);down (&dentry->d_parent->d_inode->i_sem); -down (&dentry->d_inode->i_sem); node = dir->files.next;while (node != &dir->files) {
@@ -782,7 +779,6 @@vfs_rmdir (dentry->d_parent->d_inode,dentry);up (&dentry->d_parent->d_inode->i_sem); -up (&dentry->d_inode->i_sem);/* remove reference count from when directory was created */ dput (dentry);
Quoted 6 lines · Andrey Panin
Hi,
__remove_file()indriverfs/inode.ccallsdown(&dentry->d_inode->i_sem)before callingvfs_unlink(dentry->d_parent->d_inode,dentry)which tries to claim the same semaphore causing the livelock.driverfs_remove_dir()makes the same callingvfs_rmdir().
What kernel version did you generate this patch for? This patch doesn't apply at all to 2.5.5, and it looks like this problem is already fixed.
thanks,
greg k-h
Quoted 10 lines · Greg KH
Quoted 6 lines · Andrey Panin
Hi,
__remove_file()indriverfs/inode.ccallsdown(&dentry->d_inode->i_sem)before callingvfs_unlink(dentry->d_parent->d_inode,dentry)which tries to claim the same semaphore causing the livelock.driverfs_remove_dir()makes the same callingvfs_rmdir().What kernel version did you generate this patch for? This patch doesn't apply at all to 2.5.5, and it looks like this problem is already fixed.
It's against 2.5.5-pre1, I was out of the net for some days and couldn't check final 2.5.5.
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: wwwkeys.eu.pgp.net
Quoted 9 lines · Andrey Panin
Quoted 8 lines · Greg KH
Quoted 6 lines · Andrey Panin
Hi,
__remove_file()indriverfs/inode.ccallsdown(&dentry->d_inode->i_sem)before callingvfs_unlink(dentry->d_parent->d_inode,dentry)which tries to claim the same semaphore causing the livelock.driverfs_remove_dir()makes the same callingvfs_rmdir().
Quoted 7 lines
Quoted 2 lines
What kernel version did you generate this patch for? This patch doesn't apply at all to 2.5.5, and it looks like this problem is already fixed.
It's against 2.5.5-pre1, I was out of the net for some days and couldn't check final 2.5.5.
From the changelog, it is only the mysterious "device model/driverfs
updates", but it should have indeed been fixed in 2.5.5.
Thanks,
-pat