mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
9p update for 6.13-rc1
- usbg: fix alloc failure handling & build-as-module - xen: couple of fixes - v9fs_cache_register/unregister code cleanup -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE/IPbcYBuWt0zoYhOq06b7GqY5nAFAmdJ8H4ACgkQq06b7GqY 5nCI2Q//YE1WEFLXIx8AGCZO8zspAErByLuEhsXGwc7P+O4JN3gAOBnLNqmZICpP T/GQE/diK64iDv+Q8JCSiSN/IfTigywQ3OpqPvUMK9S5uLtgs6D0bNB4jU4RuBrP 2qO4tqJQrKSUEUeJl+IefsIJjaSEv4m7pfZ9sGZPNHaoubPyNWF+Wm5cF0opFif8 ghLh5bz5I7X2E8yL6DNmjKG4fna7pIWGPUhlwE9yPMBipzeYsVzPEfeZL4NgmCcX QA6ICpgHiCmTdBXJAv0MTwaCw/oMwxIYkN85o+iQv9OKVdGltFrUdZkgmrYGoJyi eMofYBDX+kawwnuZVmzcSK+SrkzNPAWPXTPJjNdxa4uM4IK0zQyBBXasS5ogFlX+ urjMIzOyJ5CfoXiHhdJdYiBlHiYahYGBGuuqFSbrnC4JIwilNKNv607lgoF/deXh 5MNCF9PFP9xZPfr6sRVkSe5f9k9J93Z0YofQWtwOGQQphSa0jSduJbBIvF8YAVwQ QSlqm4oXmX9lAz/tKRFb9koYOfDtSnZ6MKK6GruYuNKZy9oN2av1zTzs53HUQvV0 kYNA00MC5eK3R4AYtJtWWy6GhsFsvRtDDrDpyQXI90ZA0FlFye70yCg6BWnlkzSU RyAbrOJ9fJniAlBhT2uBtTwjhoosJyTLj+eXdIvsaloIcHvpPac= =Ekpl -----END PGP SIGNATURE----- Merge tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: - usbg: fix alloc failure handling & build-as-module - xen: couple of fixes - v9fs_cache_register/unregister code cleanup * tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux: net/9p/usbg: allow building as standalone module 9p/xen: fix release of IRQ 9p/xen: fix init sequence net/9p/usbg: fix handling of the failed kzalloc() memory allocation fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
This commit is contained in:
commit
e864effa1f
21
fs/9p/v9fs.c
21
fs/9p/v9fs.c
@ -659,21 +659,6 @@ static void v9fs_destroy_inode_cache(void)
|
||||
kmem_cache_destroy(v9fs_inode_cache);
|
||||
}
|
||||
|
||||
static int v9fs_cache_register(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = v9fs_init_inode_cache();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void v9fs_cache_unregister(void)
|
||||
{
|
||||
v9fs_destroy_inode_cache();
|
||||
}
|
||||
|
||||
/**
|
||||
* init_v9fs - Initialize module
|
||||
*
|
||||
@ -686,7 +671,7 @@ static int __init init_v9fs(void)
|
||||
pr_info("Installing v9fs 9p2000 file system support\n");
|
||||
/* TODO: Setup list of registered trasnport modules */
|
||||
|
||||
err = v9fs_cache_register();
|
||||
err = v9fs_init_inode_cache();
|
||||
if (err < 0) {
|
||||
pr_err("Failed to register v9fs for caching\n");
|
||||
return err;
|
||||
@ -709,7 +694,7 @@ static int __init init_v9fs(void)
|
||||
v9fs_sysfs_cleanup();
|
||||
|
||||
out_cache:
|
||||
v9fs_cache_unregister();
|
||||
v9fs_destroy_inode_cache();
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -722,7 +707,7 @@ static int __init init_v9fs(void)
|
||||
static void __exit exit_v9fs(void)
|
||||
{
|
||||
v9fs_sysfs_cleanup();
|
||||
v9fs_cache_unregister();
|
||||
v9fs_destroy_inode_cache();
|
||||
unregister_filesystem(&v9fs_fs_type);
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ config NET_9P_XEN
|
||||
two Xen domains.
|
||||
|
||||
config NET_9P_USBG
|
||||
bool "9P USB Gadget Transport"
|
||||
depends on USB_GADGET=y || USB_GADGET=NET_9P
|
||||
tristate "9P USB Gadget Transport"
|
||||
depends on USB_GADGET
|
||||
select CONFIGFS_FS
|
||||
select USB_LIBCOMPOSITE
|
||||
help
|
||||
|
@ -909,9 +909,9 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void)
|
||||
usb9pfs_opts->buflen = DEFAULT_BUFLEN;
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (IS_ERR(dev)) {
|
||||
if (!dev) {
|
||||
kfree(usb9pfs_opts);
|
||||
return ERR_CAST(dev);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
usb9pfs_opts->dev = dev;
|
||||
|
@ -286,7 +286,7 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv)
|
||||
if (!priv->rings[i].intf)
|
||||
break;
|
||||
if (priv->rings[i].irq > 0)
|
||||
unbind_from_irqhandler(priv->rings[i].irq, priv->dev);
|
||||
unbind_from_irqhandler(priv->rings[i].irq, ring);
|
||||
if (priv->rings[i].data.in) {
|
||||
for (j = 0;
|
||||
j < (1 << priv->rings[i].intf->ring_order);
|
||||
@ -465,6 +465,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev)
|
||||
goto error;
|
||||
}
|
||||
|
||||
xenbus_switch_state(dev, XenbusStateInitialised);
|
||||
return 0;
|
||||
|
||||
error_xenbus:
|
||||
@ -512,8 +513,10 @@ static void xen_9pfs_front_changed(struct xenbus_device *dev,
|
||||
break;
|
||||
|
||||
case XenbusStateInitWait:
|
||||
if (!xen_9pfs_front_init(dev))
|
||||
xenbus_switch_state(dev, XenbusStateInitialised);
|
||||
if (dev->state != XenbusStateInitialising)
|
||||
break;
|
||||
|
||||
xen_9pfs_front_init(dev);
|
||||
break;
|
||||
|
||||
case XenbusStateConnected:
|
||||
|
Loading…
Reference in New Issue
Block a user