diff options
author | Wanpeng Li <liwp@linux.vnet.ibm.com> | 2012-07-31 19:41:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:40 -0400 |
commit | 3965c9ae47d64aadf6f13b6fcd37767b83c0689a (patch) | |
tree | 9896fbd841edbaa8e374b593ad0f7b96191cda5d /mm/backing-dev.c | |
parent | deaf386ee58d5336bbef8959bf304573afb67c20 (diff) |
mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads
Since per-BDI flusher threads were introduced in 2.6, the pdflush
mechanism is not used any more. But the old interface exported through
/proc/sys/vm/nr_pdflush_threads still exists and is obviously useless.
For back-compatibility, printk warning information and return 2 to notify
the users that the interface is removed.
Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 3387aea11209..6b4718e2ee34 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -886,3 +886,23 @@ out: | |||
886 | return ret; | 886 | return ret; |
887 | } | 887 | } |
888 | EXPORT_SYMBOL(wait_iff_congested); | 888 | EXPORT_SYMBOL(wait_iff_congested); |
889 | |||
890 | int pdflush_proc_obsolete(struct ctl_table *table, int write, | ||
891 | void __user *buffer, size_t *lenp, loff_t *ppos) | ||
892 | { | ||
893 | char kbuf[] = "0\n"; | ||
894 | |||
895 | if (*ppos) { | ||
896 | *lenp = 0; | ||
897 | return 0; | ||
898 | } | ||
899 | |||
900 | if (copy_to_user(buffer, kbuf, sizeof(kbuf))) | ||
901 | return -EFAULT; | ||
902 | printk_once(KERN_WARNING "%s exported in /proc is scheduled for removal\n", | ||
903 | table->procname); | ||
904 | |||
905 | *lenp = 2; | ||
906 | *ppos += *lenp; | ||
907 | return 2; | ||
908 | } | ||