Re: [PATCH v4] remove no longer use of pdflush interface

From: Andrew Morton
Date: Wed Jun 06 2012 - 18:51:00 EST


On Wed, 6 Jun 2012 21:38:08 +0800
Wanpeng Li <liwp.linux@xxxxxxxxx> wrote:

> From: Wanpeng Li <liwp@xxxxxxxxxxxxxxxxxx>
>
> Since per-BDI flusher introduced to linux 2.6, pdflush mechanism is not
> used any more. But the old interface of pdflush exported in/proc/sys/vm/
> is still there. In order to take attention to back-compatibility issues,
> printk warning information and return -ENOSYS to notice the users the
> interface is removed.
>
> ...
>
> +/* notice associated proc obsoleted */

This comment is pretty meaningless - I suggest simply removing it.

> +int pdflush_proc_obsolete(struct ctl_table *table, int write,
> + void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> + printk_once(KERN_WARNING "%s exported in /proc is scheduled for removal\n",
> + table->procname);
> + return -ENOSYS;
> +}

No, this immediately breaks /proc/sys/vm/nr_pdflush_threads users. To
preserve back-compatibility we should copy "0\n" out to userspace and
return 2.

> +EXPORT_SYMBOL(pdflush_proc_obsolete);

This export isn't needed?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/