Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues

Ben Myers
2011-11-10T17:42:28Z

Hey Christoph,

On Wed, Nov 09, 2011 at 02:58:47AM -0500, Christoph Hellwig wrote:
> +STATIC int
> +xfs_init_mount_workqueues(
> + struct xfs_mount *mp)
> +{
> +#define XFS_WQ_NAME_LEN 512
> + char name[XFS_WQ_NAME_LEN];
> +
> + snprintf(name, XFS_WQ_NAME_LEN, "xfs-data/%s", mp->m_fsname);
> + mp->m_data_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> + if (!mp->m_data_workqueue)
> + goto out;

Looks to me like alloc_workqueue holds on to that name pointer in
wq->name... won't overwriting the name below be a problem?

> + snprintf(name, XFS_WQ_NAME_LEN, "xfs-conv/%s", mp->m_fsname);
> + mp->m_unwritten_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> + if (!mp->m_unwritten_workqueue)
> + goto out_destroy_data_iodone_queue;

-Ben