Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119538 - submount fails with > 2.6.16-rc1 (patch attached)
Summary: submount fails with > 2.6.16-rc1 (patch attached)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 126972
  Show dependency tree
 
Reported: 2006-01-19 05:31 UTC by Patrizio Bassi
Modified: 2006-03-25 05:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Submount compile fix (patch-2.6.16-rc1,633 bytes, patch)
2006-01-19 05:32 UTC, Patrizio Bassi
Details | Diff
patch to fix 2.6.16 (submount-2.6.16-fix.diff,1.09 KB, patch)
2006-03-22 01:55 UTC, Patrizio Bassi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!