diff options
author | Daniel Drake <dsd@gentoo.org> | 2006-10-14 13:56:56 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2006-10-14 13:56:56 +0000 |
commit | 69aedd1e9c971f729c01653a9e78aed048696fd3 (patch) | |
tree | 8522305efaf5ef6571ce13014695cd15a62a706d /sys-fs | |
parent | Fix compile problem with USE=qt3 when Qt4 is installed (#114872). Compilation... (diff) | |
download | gentoo-2-69aedd1e9c971f729c01653a9e78aed048696fd3.tar.gz gentoo-2-69aedd1e9c971f729c01653a9e78aed048696fd3.tar.bz2 gentoo-2-69aedd1e9c971f729c01653a9e78aed048696fd3.zip |
Add 2.6.18 compatibility patch, tested by Phillip Berndt and Simonas Leleiva in bug #148381
(Portage version: 2.1.2_pre2-r9)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/submount/ChangeLog | 7 | ||||
-rw-r--r-- | sys-fs/submount/files/submount-0.9-2.6.18.patch | 154 | ||||
-rw-r--r-- | sys-fs/submount/submount-0.9-r2.ebuild | 5 |
3 files changed, 164 insertions, 2 deletions
diff --git a/sys-fs/submount/ChangeLog b/sys-fs/submount/ChangeLog index 51240d11b4bf..aa5453c69438 100644 --- a/sys-fs/submount/ChangeLog +++ b/sys-fs/submount/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-fs/submount # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/submount/ChangeLog,v 1.20 2006/08/18 10:12:46 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/submount/ChangeLog,v 1.21 2006/10/14 13:56:56 dsd Exp $ + + 14 Oct 2006; Daniel Drake <dsd@gentoo.org> + +files/submount-0.9-2.6.18.patch, submount-0.9-r2.ebuild: + Add 2.6.18 compatibility patch, tested by Phillip Berndt and Simonas Leleiva + in bug #148381 18 Aug 2006; Christian Heim <phreak@gentoo.org> metadata.xml: Reassigning the package to kernel@g.o, the x86-kernel bugzilla-alias is diff --git a/sys-fs/submount/files/submount-0.9-2.6.18.patch b/sys-fs/submount/files/submount-0.9-2.6.18.patch new file mode 100644 index 000000000000..77ceb7a91b3d --- /dev/null +++ b/sys-fs/submount/files/submount-0.9-2.6.18.patch @@ -0,0 +1,154 @@ +From: Daniel Drake <dsd@gentoo.org> + +Index: submount-0.9/subfs-0.9/subfs.c +=================================================================== +--- submount-0.9.orig/subfs-0.9/subfs.c ++++ submount-0.9/subfs-0.9/subfs.c +@@ -26,6 +26,7 @@ + #include <linux/signal.h> + #include <linux/sched.h> + #include <linux/version.h> ++#include <linux/rcupdate.h> + + #include "subfs.h" + +@@ -95,11 +96,11 @@ static void subfs_send_signal(void) + struct task_struct *task = current; + int signal = SIGCONT; + +- read_lock(&tasklist_lock); ++ rcu_read_lock(); + spin_lock_irq(&task->sighand->siglock); + sigaddset(&task->pending.signal, signal); + spin_unlock_irq(&task->sighand->siglock); +- read_unlock(&tasklist_lock); ++ rcu_read_unlock(); + set_tsk_thread_flag(task, TIF_SIGPENDING); + return; + } +@@ -279,9 +280,15 @@ static int subfs_open(struct inode *inod + + /* Implements the statfs method so df and such will work on the mountpoint. + */ ++#ifdef NEW_VFS_ROOT_DENTRY_API ++static int subfs_statfs(struct dentry *dentry, struct kstatfs *buf) ++{ ++ struct subfs_mount *sfs_mnt = dentry->d_sb->s_fs_info; ++#else + static int subfs_statfs(struct super_block *sb, struct kstatfs *buf) + { + struct subfs_mount *sfs_mnt = sb->s_fs_info; ++#endif + struct vfsmount *child; + if (down_interruptible(&sfs_mnt->sem)) + return -ERESTARTSYS; +@@ -405,33 +412,61 @@ static int proc_opts(struct subfs_mount + * subfs_mount structure is pointed to by the s_fs_info field of the + * superblock structure. + */ ++#ifdef NEW_VFS_ROOT_DENTRY_API ++static int subfs_get_super(struct file_system_type *fst, ++ int flags, const char *devname, void *data, ++ struct vfsmount *mnt) ++#else + static struct super_block *subfs_get_super(struct file_system_type *fst, + int flags, const char *devname, void *data) ++#endif + { + char *device; + struct subfs_mount *newmount; + int ret; + +- if (!(newmount = kmalloc(sizeof(struct subfs_mount), GFP_KERNEL))) +- return ERR_PTR(-ENOMEM); ++ if (!(newmount = kmalloc(sizeof(struct subfs_mount), GFP_KERNEL))) { ++ ret = -ENOMEM; ++ goto err; ++ } + newmount->req_fs = NULL; + newmount->sb = NULL; + newmount->mount = NULL; + newmount->procuid = 0; + sema_init(&newmount->sem, 1); +- if (!(device = kmalloc((strlen(devname) + 1), GFP_KERNEL))) +- return ERR_PTR(-ENOMEM); ++ if (!(device = kmalloc((strlen(devname) + 1), GFP_KERNEL))) { ++ ret = -ENOMEM; ++ goto err; ++ } + strcpy(device, devname); + newmount->device = device; + if (!(newmount->helper_prog = +- kmalloc(sizeof(SUBMOUNTD_PATH), GFP_KERNEL))) +- return ERR_PTR(-ENOMEM); ++ kmalloc(sizeof(SUBMOUNTD_PATH), GFP_KERNEL))) { ++ ret = -ENOMEM; ++ goto err; ++ } + strcpy(newmount->helper_prog, SUBMOUNTD_PATH); + if ((ret = proc_opts(newmount, data))) +- return ERR_PTR(ret); ++ goto err; ++#ifdef NEW_VFS_ROOT_DENTRY_API ++ ret = get_sb_nodev(fst, flags, data, subfs_fill_super, mnt); ++ if (ret) ++ goto err; ++ newmount->sb = mnt->mnt_sb; ++ newmount->sb->s_fs_info = newmount; ++ return ret; ++#else + newmount->sb = get_sb_nodev(fst, flags, data, subfs_fill_super); + newmount->sb->s_fs_info = newmount; + return newmount->sb; ++#endif ++ ++err: ++#ifdef NEW_VFS_ROOT_DENTRY_API ++ return ret; ++#else ++ return ERR_PTR(ret); ++#endif + } + + +Index: submount-0.9/subfs-0.9/subfs.h +=================================================================== +--- submount-0.9.orig/subfs-0.9/subfs.h ++++ submount-0.9/subfs-0.9/subfs.h +@@ -19,6 +19,10 @@ + + #define ROOT_MODE 0777 + ++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) ++#define NEW_VFS_ROOT_DENTRY_API ++#endif ++ + struct subfs_mount { + char *device; + char *options; +@@ -33,8 +37,17 @@ struct subfs_mount { + + + static void subfs_kill_super(struct super_block *sb); ++ ++#ifdef NEW_VFS_ROOT_DENTRY_API ++static int subfs_get_super(struct file_system_type *fst, ++ int flags, const char *devname, void *data, struct vfsmount *mnt); ++static int subfs_statfs(struct dentry *dentry, struct kstatfs *buf); ++#else + static struct super_block *subfs_get_super(struct file_system_type *fst, + int flags, const char *devname, void *data); ++static int subfs_statfs(struct super_block *sb, struct kstatfs *buf); ++#endif ++ + static struct vfsmount *get_subfs_vfsmount(struct super_block *sb); + static int subfs_fill_super(struct super_block *sb, void *data, + int silent); +@@ -47,7 +60,6 @@ static int mount_real_fs(struct subfs_mo + static void subfs_send_signal(void); + static void subfs_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, + struct dentry *dentry); +-static int subfs_statfs(struct super_block *sb, struct kstatfs *buf); + + + static struct file_system_type subfs_type = { diff --git a/sys-fs/submount/submount-0.9-r2.ebuild b/sys-fs/submount/submount-0.9-r2.ebuild index 8d7a6f3824bd..4fc9b5530cf6 100644 --- a/sys-fs/submount/submount-0.9-r2.ebuild +++ b/sys-fs/submount/submount-0.9-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/submount/submount-0.9-r2.ebuild,v 1.8 2006/03/25 14:07:54 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/submount/submount-0.9-r2.ebuild,v 1.9 2006/10/14 13:56:56 dsd Exp $ inherit linux-mod eutils @@ -40,6 +40,9 @@ src_unpack() { # Fix compile on 2.6.16, bug #119538 epatch ${FILESDIR}/${P}-sem2mutex.patch + + # Fix compile on 2.6.18, bug #148381 + epatch ${FILESDIR}/${P}-2.6.18.patch } src_compile() { |