File tree Expand file tree Collapse file tree 4 files changed +13
-25
lines changed Expand file tree Collapse file tree 4 files changed +13
-25
lines changed Original file line number Diff line number Diff line change @@ -659,21 +659,6 @@ static void v9fs_destroy_inode_cache(void)
659659 kmem_cache_destroy (v9fs_inode_cache );
660660}
661661
662- static int v9fs_cache_register (void )
663- {
664- int ret ;
665-
666- ret = v9fs_init_inode_cache ();
667- if (ret < 0 )
668- return ret ;
669- return ret ;
670- }
671-
672- static void v9fs_cache_unregister (void )
673- {
674- v9fs_destroy_inode_cache ();
675- }
676-
677662/**
678663 * init_v9fs - Initialize module
679664 *
@@ -686,7 +671,7 @@ static int __init init_v9fs(void)
686671 pr_info ("Installing v9fs 9p2000 file system support\n" );
687672 /* TODO: Setup list of registered trasnport modules */
688673
689- err = v9fs_cache_register ();
674+ err = v9fs_init_inode_cache ();
690675 if (err < 0 ) {
691676 pr_err ("Failed to register v9fs for caching\n" );
692677 return err ;
@@ -709,7 +694,7 @@ static int __init init_v9fs(void)
709694 v9fs_sysfs_cleanup ();
710695
711696out_cache :
712- v9fs_cache_unregister ();
697+ v9fs_destroy_inode_cache ();
713698
714699 return err ;
715700}
@@ -722,7 +707,7 @@ static int __init init_v9fs(void)
722707static void __exit exit_v9fs (void )
723708{
724709 v9fs_sysfs_cleanup ();
725- v9fs_cache_unregister ();
710+ v9fs_destroy_inode_cache ();
726711 unregister_filesystem (& v9fs_fs_type );
727712}
728713
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ config NET_9P_XEN
4141 two Xen domains.
4242
4343config NET_9P_USBG
44- bool "9P USB Gadget Transport"
45- depends on USB_GADGET=y || USB_GADGET=NET_9P
44+ tristate "9P USB Gadget Transport"
45+ depends on USB_GADGET
4646 select CONFIGFS_FS
4747 select USB_LIBCOMPOSITE
4848 help
Original file line number Diff line number Diff line change @@ -909,9 +909,9 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void)
909909 usb9pfs_opts -> buflen = DEFAULT_BUFLEN ;
910910
911911 dev = kzalloc (sizeof (* dev ), GFP_KERNEL );
912- if (IS_ERR ( dev ) ) {
912+ if (! dev ) {
913913 kfree (usb9pfs_opts );
914- return ERR_CAST ( dev );
914+ return ERR_PTR ( - ENOMEM );
915915 }
916916
917917 usb9pfs_opts -> dev = dev ;
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv)
286286 if (!priv -> rings [i ].intf )
287287 break ;
288288 if (priv -> rings [i ].irq > 0 )
289- unbind_from_irqhandler (priv -> rings [i ].irq , priv -> dev );
289+ unbind_from_irqhandler (priv -> rings [i ].irq , ring );
290290 if (priv -> rings [i ].data .in ) {
291291 for (j = 0 ;
292292 j < (1 << priv -> rings [i ].intf -> ring_order );
@@ -465,6 +465,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev)
465465 goto error ;
466466 }
467467
468+ xenbus_switch_state (dev , XenbusStateInitialised );
468469 return 0 ;
469470
470471 error_xenbus :
@@ -512,8 +513,10 @@ static void xen_9pfs_front_changed(struct xenbus_device *dev,
512513 break ;
513514
514515 case XenbusStateInitWait :
515- if (!xen_9pfs_front_init (dev ))
516- xenbus_switch_state (dev , XenbusStateInitialised );
516+ if (dev -> state != XenbusStateInitialising )
517+ break ;
518+
519+ xen_9pfs_front_init (dev );
517520 break ;
518521
519522 case XenbusStateConnected :
You can’t perform that action at this time.
0 commit comments