Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 119538

Summary: submount fails with > 2.6.16-rc1 (patch attached)
Product: Gentoo Linux Reporter: Patrizio Bassi <patrizio.bassi>
Component: New packagesAssignee: x86-kernel (DEPRECATED) <x86-kernel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 126972    
Attachments: Submount compile fix
patch to fix 2.6.16

Description Patrizio Bassi 2006-01-19 05:31:33 UTC
due to new mutex system submount compiles not more.

here is my fix, tested and working:

--- a/subfs-0.9/subfs.c 2004-02-26 23:54:58.000000000 +0100
+++ b/subfs-0.9/subfs.c 2006-01-19 14:12:26.000000000 +0100
@@ -221,14 +221,14 @@
        struct vfsmount *child;

        /* This is ugly, but prevents a lockup during mount. */
-       up(&dir->i_sem);
+       mutex_lock(&dir->i_mutex);
        if (down_interruptible(&sfs_mnt->sem)) {
-               down(&dir->i_sem);/*put the dir sem back down if interrupted*/
+               mutex_unlock(&dir->i_mutex);
                return ERR_PTR(-ERESTARTSYS);
        }
        child = get_child_mount(sfs_mnt);
        up(&sfs_mnt->sem);
-       down(&dir->i_sem);
+       mutex_unlock(&dir->i_mutex);
        if (IS_ERR(child))
                return (void *) child;
        subfs_send_signal();

please apply.
full story link here:
http://www.patriziobassi.it/blog/?p=8
Comment 1 Patrizio Bassi 2006-01-19 05:32:05 UTC
Created attachment 77525 [details, diff]
Submount compile fix

and file attachment too.
Comment 2 Patrizio Bassi 2006-03-20 08:52:21 UTC
big warning

compilation works, but there are some deadlock that take process (like a file manager or simple ls) to D status.

i've no idea how to solve those, keeping the mutexes.
Comment 3 Patrizio Bassi 2006-03-22 01:54:22 UTC
fixed!

the problem was in a typo in the patch which changed lock/unlock sequence.

now works.

i've edited the patch so you can apply without any kernel version tests, done in the patch.

please apply to portage and mark as fixed
Comment 4 Patrizio Bassi 2006-03-22 01:55:14 UTC
Created attachment 82851 [details, diff]
patch to fix 2.6.16

full story and download link here:
http://www.patriziobassi.it/blog/?p=24
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-03-25 05:45:48 UTC
fixed and sent upstream, thanks!