File tree 4 files changed +13
-25
lines changed
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)
659
659
kmem_cache_destroy (v9fs_inode_cache );
660
660
}
661
661
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
-
677
662
/**
678
663
* init_v9fs - Initialize module
679
664
*
@@ -686,7 +671,7 @@ static int __init init_v9fs(void)
686
671
pr_info ("Installing v9fs 9p2000 file system support\n" );
687
672
/* TODO: Setup list of registered trasnport modules */
688
673
689
- err = v9fs_cache_register ();
674
+ err = v9fs_init_inode_cache ();
690
675
if (err < 0 ) {
691
676
pr_err ("Failed to register v9fs for caching\n" );
692
677
return err ;
@@ -709,7 +694,7 @@ static int __init init_v9fs(void)
709
694
v9fs_sysfs_cleanup ();
710
695
711
696
out_cache :
712
- v9fs_cache_unregister ();
697
+ v9fs_destroy_inode_cache ();
713
698
714
699
return err ;
715
700
}
@@ -722,7 +707,7 @@ static int __init init_v9fs(void)
722
707
static void __exit exit_v9fs (void )
723
708
{
724
709
v9fs_sysfs_cleanup ();
725
- v9fs_cache_unregister ();
710
+ v9fs_destroy_inode_cache ();
726
711
unregister_filesystem (& v9fs_fs_type );
727
712
}
728
713
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ config NET_9P_XEN
41
41
two Xen domains.
42
42
43
43
config 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
46
46
select CONFIGFS_FS
47
47
select USB_LIBCOMPOSITE
48
48
help
Original file line number Diff line number Diff line change @@ -909,9 +909,9 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void)
909
909
usb9pfs_opts -> buflen = DEFAULT_BUFLEN ;
910
910
911
911
dev = kzalloc (sizeof (* dev ), GFP_KERNEL );
912
- if (IS_ERR ( dev ) ) {
912
+ if (! dev ) {
913
913
kfree (usb9pfs_opts );
914
- return ERR_CAST ( dev );
914
+ return ERR_PTR ( - ENOMEM );
915
915
}
916
916
917
917
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)
286
286
if (!priv -> rings [i ].intf )
287
287
break ;
288
288
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 );
290
290
if (priv -> rings [i ].data .in ) {
291
291
for (j = 0 ;
292
292
j < (1 << priv -> rings [i ].intf -> ring_order );
@@ -465,6 +465,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev)
465
465
goto error ;
466
466
}
467
467
468
+ xenbus_switch_state (dev , XenbusStateInitialised );
468
469
return 0 ;
469
470
470
471
error_xenbus :
@@ -512,8 +513,10 @@ static void xen_9pfs_front_changed(struct xenbus_device *dev,
512
513
break ;
513
514
514
515
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 );
517
520
break ;
518
521
519
522
case XenbusStateConnected :
You can’t perform that action at this time.
0 commit comments