Re: [PATCH] avoid memory allocations in xfs_fs_vcmn_err

Eric Sandeen
2008-12-17T17:46:17Z

Christoph Hellwig wrote:

> + if (mp) {
> + len = sprintf(message, "Filesystem \"%s\": ", mp->m_fsname);
> +
> + /*
> + * Skip the printk if we can't print anything useful
> + * due to an over-long device name.
> + */
> + if (len >= sizeof(message))
> + goto out;

Do we really want to drop the whole message if the fs name can't fit?
Maybe drop the fsname altogether and print the error anyway? Being
completely silent doesn't sound great...

-Eric