Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 214629 Details for
Bug 298988
app-emulation/virtualbox-guest-additions: various kernel module problems
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add backing_dev_info init/destroy calls to vboxvfs
vboxvfs-fix-bdi-init.patch (text/plain), 2.58 KB, created by
PaX Team
on 2009-12-30 15:30:36 UTC
(
hide
)
Description:
add backing_dev_info init/destroy calls to vboxvfs
Filename:
MIME Type:
Creator:
PaX Team
Created:
2009-12-30 15:30:36 UTC
Size:
2.58 KB
patch
obsolete
>diff -urp vboxvfs.old/utils.c vboxvfs/utils.c >--- vboxvfs.old/utils.c 2009-12-29 21:28:05.000000000 +0100 >+++ vboxvfs/utils.c 2009-12-29 22:17:19.000000000 +0100 >@@ -49,6 +49,21 @@ static struct backing_dev_info sf_backin > | BDI_CAP_EXEC_MAP, /* can be mapped for execution */ > # endif > }; >+ >+int sf_bdi_init (const struct vbsf_mount_info_new *info) >+{ >+ int err; >+ >+ err = bdi_init (&sf_backing_dev_info); >+ if (!err) >+ err = bdi_register (&sf_backing_dev_info, NULL, "vboxvfs-%s", info->name); >+ return err; >+} >+ >+void sf_bdi_destroy (void) >+{ >+ bdi_destroy (&sf_backing_dev_info); >+} > #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) */ > > #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0) >diff -urp vboxvfs.old/vfsmod.c vboxvfs/vfsmod.c >--- vboxvfs.old/vfsmod.c 2009-12-29 21:27:25.000000000 +0100 >+++ vboxvfs/vfsmod.c 2009-12-29 22:14:03.000000000 +0100 >@@ -286,6 +286,14 @@ sf_read_super_aux (struct super_block *s > goto fail3; > } > >+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) >+ if (sf_bdi_init (info)) { >+ err = -ENOMEM; /* XXX */ >+ LogFunc(("could not init bdi\n")); >+ goto fail4; >+ } >+#endif >+ > sf_init_inode (sf_g, iroot, &fsinfo); > SET_INODE_INFO (iroot, sf_i); > >@@ -297,13 +305,15 @@ sf_read_super_aux (struct super_block *s > if (!droot) { > err = -ENOMEM; /* XXX */ > LogFunc(("d_alloc_root failed\n")); >- goto fail4; >+ goto fail5; > } > > sb->s_root = droot; > SET_GLOB_INFO (sb, sf_g); > return 0; > >+ fail5: >+ sf_bdi_destroy (); > fail4: > iput (iroot); > fail3: >@@ -369,6 +379,9 @@ sf_put_super (struct super_block *sb) > { > struct sf_glob_info *sf_g; > >+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) >+ sf_bdi_destroy (); >+#endif > sf_g = GET_GLOB_INFO (sb); > BUG_ON (!sf_g); > sf_glob_free (sf_g); >diff -urp vboxvfs.old/vfsmod.h vboxvfs/vfsmod.h >--- vboxvfs.old/vfsmod.h 2009-12-29 21:27:25.000000000 +0100 >+++ vboxvfs/vfsmod.h 2009-12-29 22:17:14.000000000 +0100 >@@ -81,6 +81,13 @@ extern struct address_space_operations s > extern void > sf_init_inode (struct sf_glob_info *sf_g, struct inode *inode, > RTFSOBJINFO *info); >+ >+extern int >+sf_bdi_init (const struct vbsf_mount_info_new *info); >+ >+extern void >+sf_bdi_destroy (void); >+ > extern int > sf_stat (const char *caller, struct sf_glob_info *sf_g, > SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 298988
:
214628
| 214629