aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-29 19:22:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-29 19:22:54 -0500
commit13293115d1c44df1077976473112d18f1877c390 (patch)
tree0c1c4d1cb478cdb9dc159ce9a7bc9e7425324a36
parent1ecd7450c0503d99675109a4cd43ecd735b9d876 (diff)
parenta4edbc1011513117ec5a96a7b24ae2f94e13f28f (diff)
Merge branch 'akpm' (patches from Andrew Morton)
Merge random fixes from Andrew Morton: "Random fixes. I have one batch remaining for -rc1, mainly zram changes which await a merge of Jens's trees" * emailed patches fron Andrew Morton akpm@linux-foundation.org>: MAINTAINERS: ADI Linux development mailing lists: change to the new server Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ dma-debug: fix overlap detection memblock: add limit checking to memblock_virt_alloc mm/readahead.c: fix do_readahead() for no readpage(s) mm/slub.c: do not VM_BUG_ON_PAGE() for temporary on-stack pages slab: fix wrong retval on kmem_cache_create_memcg error path s390/compat: change parameter types from unsigned long to compat_ulong_t fs/compat: fix lookup_dcookie() parameter handling fs/compat: fix parameter handling for compat readv/writev syscalls mm/mempolicy.c: convert to pr_foo() mm: numa: initialise numa balancing after jump label initialisation mm/page-writeback.c: do not count anon pages as dirtyable memory mm/page-writeback.c: fix dirty_balance_reserve subtraction from dirtyable memory mm: document improved handling of swappiness==0 lib/genalloc.c: add check gen_pool_dma_alloc() if dma pointer is not NULL
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget12
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-acm2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ecm2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-eem2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ffs2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-loopback2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-mass-storage4
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ncm2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-obex2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-phonet2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-rndis2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-serial2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-sourcesink2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-subset2
-rw-r--r--Documentation/sysctl/vm.txt4
-rw-r--r--MAINTAINERS42
-rw-r--r--arch/s390/kernel/compat_linux.c4
-rw-r--r--fs/dcookies.c2
-rw-r--r--fs/read_write.c16
-rw-r--r--include/linux/compat.h18
-rw-r--r--include/linux/vmstat.h2
-rw-r--r--lib/dma-debug.c10
-rw-r--r--lib/genalloc.c5
-rw-r--r--mm/internal.h1
-rw-r--r--mm/memblock.c3
-rw-r--r--mm/mempolicy.c19
-rw-r--r--mm/page-writeback.c57
-rw-r--r--mm/readahead.c15
-rw-r--r--mm/slab_common.c19
-rw-r--r--mm/slub.c12
-rw-r--r--mm/vmscan.c23
31 files changed, 137 insertions, 155 deletions
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget
index 01e769d6984d..37559a06393b 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget
+++ b/Documentation/ABI/testing/configfs-usb-gadget
@@ -1,13 +1,13 @@
1What: /config/usb-gadget 1What: /config/usb-gadget
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 This group contains sub-groups corresponding to created 5 This group contains sub-groups corresponding to created
6 USB gadgets. 6 USB gadgets.
7 7
8What: /config/usb-gadget/gadget 8What: /config/usb-gadget/gadget
9Date: Jun 2013 9Date: Jun 2013
10KenelVersion: 3.11 10KernelVersion: 3.11
11Description: 11Description:
12 12
13 The attributes of a gadget: 13 The attributes of a gadget:
@@ -27,7 +27,7 @@ Description:
27 27
28What: /config/usb-gadget/gadget/configs 28What: /config/usb-gadget/gadget/configs
29Date: Jun 2013 29Date: Jun 2013
30KenelVersion: 3.11 30KernelVersion: 3.11
31Description: 31Description:
32 This group contains a USB gadget's configurations 32 This group contains a USB gadget's configurations
33 33
@@ -58,20 +58,20 @@ Description:
58 58
59What: /config/usb-gadget/gadget/functions 59What: /config/usb-gadget/gadget/functions
60Date: Jun 2013 60Date: Jun 2013
61KenelVersion: 3.11 61KernelVersion: 3.11
62Description: 62Description:
63 This group contains functions available to this USB gadget. 63 This group contains functions available to this USB gadget.
64 64
65What: /config/usb-gadget/gadget/strings 65What: /config/usb-gadget/gadget/strings
66Date: Jun 2013 66Date: Jun 2013
67KenelVersion: 3.11 67KernelVersion: 3.11
68Description: 68Description:
69 This group contains subdirectories for language-specific 69 This group contains subdirectories for language-specific
70 strings for this gadget. 70 strings for this gadget.
71 71
72What: /config/usb-gadget/gadget/strings/language 72What: /config/usb-gadget/gadget/strings/language
73Date: Jun 2013 73Date: Jun 2013
74KenelVersion: 3.11 74KernelVersion: 3.11
75Description: 75Description:
76 The attributes: 76 The attributes:
77 77
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-acm b/Documentation/ABI/testing/configfs-usb-gadget-acm
index 5708a568b5f6..d21092d75a05 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-acm
+++ b/Documentation/ABI/testing/configfs-usb-gadget-acm
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/acm.name 1What: /config/usb-gadget/gadget/functions/acm.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 5
6 This item contains just one readonly attribute: port_num. 6 This item contains just one readonly attribute: port_num.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ecm b/Documentation/ABI/testing/configfs-usb-gadget-ecm
index 6b9a582ce0b5..0addf7704b4c 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-ecm
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ecm
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/ecm.name 1What: /config/usb-gadget/gadget/functions/ecm.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-eem b/Documentation/ABI/testing/configfs-usb-gadget-eem
index dbddf36b48b3..a4c57158fcde 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-eem
+++ b/Documentation/ABI/testing/configfs-usb-gadget-eem
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/eem.name 1What: /config/usb-gadget/gadget/functions/eem.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ffs b/Documentation/ABI/testing/configfs-usb-gadget-ffs
index 14343e237e83..e39b27653c65 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-ffs
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ffs
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/ffs.name 1What: /config/usb-gadget/gadget/functions/ffs.name
2Date: Nov 2013 2Date: Nov 2013
3KenelVersion: 3.13 3KernelVersion: 3.13
4Description: The purpose of this directory is to create and remove it. 4Description: The purpose of this directory is to create and remove it.
5 5
6 A corresponding USB function instance is created/removed. 6 A corresponding USB function instance is created/removed.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-loopback b/Documentation/ABI/testing/configfs-usb-gadget-loopback
index 852b2365a5b5..9aae5bfb9908 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-loopback
+++ b/Documentation/ABI/testing/configfs-usb-gadget-loopback
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/Loopback.name 1What: /config/usb-gadget/gadget/functions/Loopback.name
2Date: Nov 2013 2Date: Nov 2013
3KenelVersion: 3.13 3KernelVersion: 3.13
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-mass-storage b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
index ad72a37ee9ff..9931fb0d63ba 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
+++ b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/mass_storage.name 1What: /config/usb-gadget/gadget/functions/mass_storage.name
2Date: Oct 2013 2Date: Oct 2013
3KenelVersion: 3.13 3KernelVersion: 3.13
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
@@ -13,7 +13,7 @@ Description:
13 13
14What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name 14What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name
15Date: Oct 2013 15Date: Oct 2013
16KenelVersion: 3.13 16KernelVersion: 3.13
17Description: 17Description:
18 The attributes: 18 The attributes:
19 19
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ncm b/Documentation/ABI/testing/configfs-usb-gadget-ncm
index bc309f42357d..6fe723effc78 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-ncm
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ncm
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/ncm.name 1What: /config/usb-gadget/gadget/functions/ncm.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-obex b/Documentation/ABI/testing/configfs-usb-gadget-obex
index aaa5c96fb7c6..a6a9327ed9ba 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-obex
+++ b/Documentation/ABI/testing/configfs-usb-gadget-obex
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/obex.name 1What: /config/usb-gadget/gadget/functions/obex.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 5
6 This item contains just one readonly attribute: port_num. 6 This item contains just one readonly attribute: port_num.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-phonet b/Documentation/ABI/testing/configfs-usb-gadget-phonet
index 3e3b742cdfd7..7037a358e6c4 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-phonet
+++ b/Documentation/ABI/testing/configfs-usb-gadget-phonet
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/phonet.name 1What: /config/usb-gadget/gadget/functions/phonet.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 5
6 This item contains just one readonly attribute: ifname. 6 This item contains just one readonly attribute: ifname.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-rndis b/Documentation/ABI/testing/configfs-usb-gadget-rndis
index 822e6dad8fc0..e32879b84b4d 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-rndis
+++ b/Documentation/ABI/testing/configfs-usb-gadget-rndis
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/rndis.name 1What: /config/usb-gadget/gadget/functions/rndis.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-serial b/Documentation/ABI/testing/configfs-usb-gadget-serial
index 16f130c1501f..474d249f760b 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-serial
+++ b/Documentation/ABI/testing/configfs-usb-gadget-serial
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/gser.name 1What: /config/usb-gadget/gadget/functions/gser.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 5
6 This item contains just one readonly attribute: port_num. 6 This item contains just one readonly attribute: port_num.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
index a30f3093ef6c..29477c319f61 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
+++ b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/SourceSink.name 1What: /config/usb-gadget/gadget/functions/SourceSink.name
2Date: Nov 2013 2Date: Nov 2013
3KenelVersion: 3.13 3KernelVersion: 3.13
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-subset b/Documentation/ABI/testing/configfs-usb-gadget-subset
index 154ae597cd99..9373e2c51ea4 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-subset
+++ b/Documentation/ABI/testing/configfs-usb-gadget-subset
@@ -1,6 +1,6 @@
1What: /config/usb-gadget/gadget/functions/geth.name 1What: /config/usb-gadget/gadget/functions/geth.name
2Date: Jun 2013 2Date: Jun 2013
3KenelVersion: 3.11 3KernelVersion: 3.11
4Description: 4Description:
5 The attributes: 5 The attributes:
6 6
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 9f5481bdc5a4..d614a9b6a280 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -696,7 +696,9 @@ swappiness
696 696
697This control is used to define how aggressive the kernel will swap 697This control is used to define how aggressive the kernel will swap
698memory pages. Higher values will increase agressiveness, lower values 698memory pages. Higher values will increase agressiveness, lower values
699decrease the amount of swap. 699decrease the amount of swap. A value of 0 instructs the kernel not to
700initiate swap until the amount of free and file-backed pages is less
701than the high water mark in a zone.
700 702
701The default value is 60. 703The default value is 60.
702 704
diff --git a/MAINTAINERS b/MAINTAINERS
index 6d73831cfdee..38b81df6701c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -309,36 +309,36 @@ F: sound/pci/ad1889.*
309 309
310AD525X ANALOG DEVICES DIGITAL POTENTIOMETERS DRIVER 310AD525X ANALOG DEVICES DIGITAL POTENTIOMETERS DRIVER
311M: Michael Hennerich <michael.hennerich@analog.com> 311M: Michael Hennerich <michael.hennerich@analog.com>
312L: device-drivers-devel@blackfin.uclinux.org
313W: http://wiki.analog.com/AD5254 312W: http://wiki.analog.com/AD5254
313W: http://ez.analog.com/community/linux-device-drivers
314S: Supported 314S: Supported
315F: drivers/misc/ad525x_dpot.c 315F: drivers/misc/ad525x_dpot.c
316 316
317AD5398 CURRENT REGULATOR DRIVER (AD5398/AD5821) 317AD5398 CURRENT REGULATOR DRIVER (AD5398/AD5821)
318M: Michael Hennerich <michael.hennerich@analog.com> 318M: Michael Hennerich <michael.hennerich@analog.com>
319L: device-drivers-devel@blackfin.uclinux.org
320W: http://wiki.analog.com/AD5398 319W: http://wiki.analog.com/AD5398
320W: http://ez.analog.com/community/linux-device-drivers
321S: Supported 321S: Supported
322F: drivers/regulator/ad5398.c 322F: drivers/regulator/ad5398.c
323 323
324AD714X CAPACITANCE TOUCH SENSOR DRIVER (AD7142/3/7/8/7A) 324AD714X CAPACITANCE TOUCH SENSOR DRIVER (AD7142/3/7/8/7A)
325M: Michael Hennerich <michael.hennerich@analog.com> 325M: Michael Hennerich <michael.hennerich@analog.com>
326L: device-drivers-devel@blackfin.uclinux.org
327W: http://wiki.analog.com/AD7142 326W: http://wiki.analog.com/AD7142
327W: http://ez.analog.com/community/linux-device-drivers
328S: Supported 328S: Supported
329F: drivers/input/misc/ad714x.c 329F: drivers/input/misc/ad714x.c
330 330
331AD7877 TOUCHSCREEN DRIVER 331AD7877 TOUCHSCREEN DRIVER
332M: Michael Hennerich <michael.hennerich@analog.com> 332M: Michael Hennerich <michael.hennerich@analog.com>
333L: device-drivers-devel@blackfin.uclinux.org
334W: http://wiki.analog.com/AD7877 333W: http://wiki.analog.com/AD7877
334W: http://ez.analog.com/community/linux-device-drivers
335S: Supported 335S: Supported
336F: drivers/input/touchscreen/ad7877.c 336F: drivers/input/touchscreen/ad7877.c
337 337
338AD7879 TOUCHSCREEN DRIVER (AD7879/AD7889) 338AD7879 TOUCHSCREEN DRIVER (AD7879/AD7889)
339M: Michael Hennerich <michael.hennerich@analog.com> 339M: Michael Hennerich <michael.hennerich@analog.com>
340L: device-drivers-devel@blackfin.uclinux.org
341W: http://wiki.analog.com/AD7879 340W: http://wiki.analog.com/AD7879
341W: http://ez.analog.com/community/linux-device-drivers
342S: Supported 342S: Supported
343F: drivers/input/touchscreen/ad7879.c 343F: drivers/input/touchscreen/ad7879.c
344 344
@@ -374,8 +374,8 @@ F: include/media/adp1653.h
374 374
375ADP5520 BACKLIGHT DRIVER WITH IO EXPANDER (ADP5520/ADP5501) 375ADP5520 BACKLIGHT DRIVER WITH IO EXPANDER (ADP5520/ADP5501)
376M: Michael Hennerich <michael.hennerich@analog.com> 376M: Michael Hennerich <michael.hennerich@analog.com>
377L: device-drivers-devel@blackfin.uclinux.org
378W: http://wiki.analog.com/ADP5520 377W: http://wiki.analog.com/ADP5520
378W: http://ez.analog.com/community/linux-device-drivers
379S: Supported 379S: Supported
380F: drivers/mfd/adp5520.c 380F: drivers/mfd/adp5520.c
381F: drivers/video/backlight/adp5520_bl.c 381F: drivers/video/backlight/adp5520_bl.c
@@ -385,16 +385,16 @@ F: drivers/input/keyboard/adp5520-keys.c
385 385
386ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587) 386ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587)
387M: Michael Hennerich <michael.hennerich@analog.com> 387M: Michael Hennerich <michael.hennerich@analog.com>
388L: device-drivers-devel@blackfin.uclinux.org
389W: http://wiki.analog.com/ADP5588 388W: http://wiki.analog.com/ADP5588
389W: http://ez.analog.com/community/linux-device-drivers
390S: Supported 390S: Supported
391F: drivers/input/keyboard/adp5588-keys.c 391F: drivers/input/keyboard/adp5588-keys.c
392F: drivers/gpio/gpio-adp5588.c 392F: drivers/gpio/gpio-adp5588.c
393 393
394ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863) 394ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863)
395M: Michael Hennerich <michael.hennerich@analog.com> 395M: Michael Hennerich <michael.hennerich@analog.com>
396L: device-drivers-devel@blackfin.uclinux.org
397W: http://wiki.analog.com/ADP8860 396W: http://wiki.analog.com/ADP8860
397W: http://ez.analog.com/community/linux-device-drivers
398S: Supported 398S: Supported
399F: drivers/video/backlight/adp8860_bl.c 399F: drivers/video/backlight/adp8860_bl.c
400 400
@@ -420,8 +420,8 @@ F: drivers/hwmon/adt7475.c
420 420
421ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346) 421ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346)
422M: Michael Hennerich <michael.hennerich@analog.com> 422M: Michael Hennerich <michael.hennerich@analog.com>
423L: device-drivers-devel@blackfin.uclinux.org
424W: http://wiki.analog.com/ADXL345 423W: http://wiki.analog.com/ADXL345
424W: http://ez.analog.com/community/linux-device-drivers
425S: Supported 425S: Supported
426F: drivers/input/misc/adxl34x.c 426F: drivers/input/misc/adxl34x.c
427 427
@@ -627,9 +627,9 @@ F: drivers/media/i2c/adv7842*
627 627
628ANALOG DEVICES INC ASOC CODEC DRIVERS 628ANALOG DEVICES INC ASOC CODEC DRIVERS
629M: Lars-Peter Clausen <lars@metafoo.de> 629M: Lars-Peter Clausen <lars@metafoo.de>
630L: device-drivers-devel@blackfin.uclinux.org
631L: alsa-devel@alsa-project.org (moderated for non-subscribers) 630L: alsa-devel@alsa-project.org (moderated for non-subscribers)
632W: http://wiki.analog.com/ 631W: http://wiki.analog.com/
632W: http://ez.analog.com/community/linux-device-drivers
633S: Supported 633S: Supported
634F: sound/soc/codecs/adau* 634F: sound/soc/codecs/adau*
635F: sound/soc/codecs/adav* 635F: sound/soc/codecs/adav*
@@ -639,7 +639,7 @@ F: sound/soc/codecs/ssm*
639F: sound/soc/codecs/sigmadsp.* 639F: sound/soc/codecs/sigmadsp.*
640 640
641ANALOG DEVICES INC ASOC DRIVERS 641ANALOG DEVICES INC ASOC DRIVERS
642L: uclinux-dist-devel@blackfin.uclinux.org 642L: adi-buildroot-devel@lists.sourceforge.net
643L: alsa-devel@alsa-project.org (moderated for non-subscribers) 643L: alsa-devel@alsa-project.org (moderated for non-subscribers)
644W: http://blackfin.uclinux.org/ 644W: http://blackfin.uclinux.org/
645S: Supported 645S: Supported
@@ -1742,56 +1742,54 @@ F: fs/bfs/
1742F: include/uapi/linux/bfs_fs.h 1742F: include/uapi/linux/bfs_fs.h
1743 1743
1744BLACKFIN ARCHITECTURE 1744BLACKFIN ARCHITECTURE
1745M: Mike Frysinger <vapier@gentoo.org> 1745M: Steven Miao <realmz6@gmail.com>
1746L: uclinux-dist-devel@blackfin.uclinux.org 1746L: adi-buildroot-devel@lists.sourceforge.net
1747W: http://blackfin.uclinux.org 1747W: http://blackfin.uclinux.org
1748S: Supported 1748S: Supported
1749F: arch/blackfin/ 1749F: arch/blackfin/
1750 1750
1751BLACKFIN EMAC DRIVER 1751BLACKFIN EMAC DRIVER
1752L: uclinux-dist-devel@blackfin.uclinux.org 1752L: adi-buildroot-devel@lists.sourceforge.net
1753W: http://blackfin.uclinux.org 1753W: http://blackfin.uclinux.org
1754S: Supported 1754S: Supported
1755F: drivers/net/ethernet/adi/ 1755F: drivers/net/ethernet/adi/
1756 1756
1757BLACKFIN RTC DRIVER 1757BLACKFIN RTC DRIVER
1758M: Mike Frysinger <vapier.adi@gmail.com> 1758L: adi-buildroot-devel@lists.sourceforge.net
1759L: uclinux-dist-devel@blackfin.uclinux.org
1760W: http://blackfin.uclinux.org 1759W: http://blackfin.uclinux.org
1761S: Supported 1760S: Supported
1762F: drivers/rtc/rtc-bfin.c 1761F: drivers/rtc/rtc-bfin.c
1763 1762
1764BLACKFIN SDH DRIVER 1763BLACKFIN SDH DRIVER
1765M: Sonic Zhang <sonic.zhang@analog.com> 1764M: Sonic Zhang <sonic.zhang@analog.com>
1766L: uclinux-dist-devel@blackfin.uclinux.org 1765L: adi-buildroot-devel@lists.sourceforge.net
1767W: http://blackfin.uclinux.org 1766W: http://blackfin.uclinux.org
1768S: Supported 1767S: Supported
1769F: drivers/mmc/host/bfin_sdh.c 1768F: drivers/mmc/host/bfin_sdh.c
1770 1769
1771BLACKFIN SERIAL DRIVER 1770BLACKFIN SERIAL DRIVER
1772M: Sonic Zhang <sonic.zhang@analog.com> 1771M: Sonic Zhang <sonic.zhang@analog.com>
1773L: uclinux-dist-devel@blackfin.uclinux.org 1772L: adi-buildroot-devel@lists.sourceforge.net
1774W: http://blackfin.uclinux.org 1773W: http://blackfin.uclinux.org
1775S: Supported 1774S: Supported
1776F: drivers/tty/serial/bfin_uart.c 1775F: drivers/tty/serial/bfin_uart.c
1777 1776
1778BLACKFIN WATCHDOG DRIVER 1777BLACKFIN WATCHDOG DRIVER
1779M: Mike Frysinger <vapier.adi@gmail.com> 1778L: adi-buildroot-devel@lists.sourceforge.net
1780L: uclinux-dist-devel@blackfin.uclinux.org
1781W: http://blackfin.uclinux.org 1779W: http://blackfin.uclinux.org
1782S: Supported 1780S: Supported
1783F: drivers/watchdog/bfin_wdt.c 1781F: drivers/watchdog/bfin_wdt.c
1784 1782
1785BLACKFIN I2C TWI DRIVER 1783BLACKFIN I2C TWI DRIVER
1786M: Sonic Zhang <sonic.zhang@analog.com> 1784M: Sonic Zhang <sonic.zhang@analog.com>
1787L: uclinux-dist-devel@blackfin.uclinux.org 1785L: adi-buildroot-devel@lists.sourceforge.net
1788W: http://blackfin.uclinux.org/ 1786W: http://blackfin.uclinux.org/
1789S: Supported 1787S: Supported
1790F: drivers/i2c/busses/i2c-bfin-twi.c 1788F: drivers/i2c/busses/i2c-bfin-twi.c
1791 1789
1792BLACKFIN MEDIA DRIVER 1790BLACKFIN MEDIA DRIVER
1793M: Scott Jiang <scott.jiang.linux@gmail.com> 1791M: Scott Jiang <scott.jiang.linux@gmail.com>
1794L: uclinux-dist-devel@blackfin.uclinux.org 1792L: adi-buildroot-devel@lists.sourceforge.net
1795W: http://blackfin.uclinux.org/ 1793W: http://blackfin.uclinux.org/
1796S: Supported 1794S: Supported
1797F: drivers/media/platform/blackfin/ 1795F: drivers/media/platform/blackfin/
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index e030d2bdec1b..db02052bd137 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -286,8 +286,8 @@ asmlinkage long sys32_getegid16(void)
286} 286}
287 287
288#ifdef CONFIG_SYSVIPC 288#ifdef CONFIG_SYSVIPC
289COMPAT_SYSCALL_DEFINE5(s390_ipc, uint, call, int, first, unsigned long, second, 289COMPAT_SYSCALL_DEFINE5(s390_ipc, uint, call, int, first, compat_ulong_t, second,
290 unsigned long, third, compat_uptr_t, ptr) 290 compat_ulong_t, third, compat_uptr_t, ptr)
291{ 291{
292 if (call >> 16) /* hack for backward compatibility */ 292 if (call >> 16) /* hack for backward compatibility */
293 return -EINVAL; 293 return -EINVAL;
diff --git a/fs/dcookies.c b/fs/dcookies.c
index ab5954b50267..ac44a69fbea9 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -204,7 +204,7 @@ out:
204} 204}
205 205
206#ifdef CONFIG_COMPAT 206#ifdef CONFIG_COMPAT
207COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, size_t, len) 207COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, compat_size_t, len)
208{ 208{
209#ifdef __BIG_ENDIAN 209#ifdef __BIG_ENDIAN
210 return sys_lookup_dcookie(((u64)w0 << 32) | w1, buf, len); 210 return sys_lookup_dcookie(((u64)w0 << 32) | w1, buf, len);
diff --git a/fs/read_write.c b/fs/read_write.c
index 1193ffd03565..edc5746a902a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -964,9 +964,9 @@ out:
964 return ret; 964 return ret;
965} 965}
966 966
967COMPAT_SYSCALL_DEFINE3(readv, unsigned long, fd, 967COMPAT_SYSCALL_DEFINE3(readv, compat_ulong_t, fd,
968 const struct compat_iovec __user *,vec, 968 const struct compat_iovec __user *,vec,
969 unsigned long, vlen) 969 compat_ulong_t, vlen)
970{ 970{
971 struct fd f = fdget(fd); 971 struct fd f = fdget(fd);
972 ssize_t ret; 972 ssize_t ret;
@@ -1001,9 +1001,9 @@ COMPAT_SYSCALL_DEFINE4(preadv64, unsigned long, fd,
1001 return ret; 1001 return ret;
1002} 1002}
1003 1003
1004COMPAT_SYSCALL_DEFINE5(preadv, unsigned long, fd, 1004COMPAT_SYSCALL_DEFINE5(preadv, compat_ulong_t, fd,
1005 const struct compat_iovec __user *,vec, 1005 const struct compat_iovec __user *,vec,
1006 unsigned long, vlen, u32, pos_low, u32, pos_high) 1006 compat_ulong_t, vlen, u32, pos_low, u32, pos_high)
1007{ 1007{
1008 loff_t pos = ((loff_t)pos_high << 32) | pos_low; 1008 loff_t pos = ((loff_t)pos_high << 32) | pos_low;
1009 return compat_sys_preadv64(fd, vec, vlen, pos); 1009 return compat_sys_preadv64(fd, vec, vlen, pos);
@@ -1031,9 +1031,9 @@ out:
1031 return ret; 1031 return ret;
1032} 1032}
1033 1033
1034COMPAT_SYSCALL_DEFINE3(writev, unsigned long, fd, 1034COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd,
1035 const struct compat_iovec __user *, vec, 1035 const struct compat_iovec __user *, vec,
1036 unsigned long, vlen) 1036 compat_ulong_t, vlen)
1037{ 1037{
1038 struct fd f = fdget(fd); 1038 struct fd f = fdget(fd);
1039 ssize_t ret; 1039 ssize_t ret;
@@ -1068,9 +1068,9 @@ COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd,
1068 return ret; 1068 return ret;
1069} 1069}
1070 1070
1071COMPAT_SYSCALL_DEFINE5(pwritev, unsigned long, fd, 1071COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
1072 const struct compat_iovec __user *,vec, 1072 const struct compat_iovec __user *,vec,
1073 unsigned long, vlen, u32, pos_low, u32, pos_high) 1073 compat_ulong_t, vlen, u32, pos_low, u32, pos_high)
1074{ 1074{
1075 loff_t pos = ((loff_t)pos_high << 32) | pos_low; 1075 loff_t pos = ((loff_t)pos_high << 32) | pos_low;
1076 return compat_sys_pwritev64(fd, vec, vlen, pos); 1076 return compat_sys_pwritev64(fd, vec, vlen, pos);
diff --git a/include/linux/compat.h b/include/linux/compat.h
index eb8a49d75ab3..19f6003291de 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -327,16 +327,16 @@ asmlinkage long compat_sys_keyctl(u32 option,
327 u32 arg2, u32 arg3, u32 arg4, u32 arg5); 327 u32 arg2, u32 arg3, u32 arg4, u32 arg5);
328asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32); 328asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
329 329
330asmlinkage ssize_t compat_sys_readv(unsigned long fd, 330asmlinkage ssize_t compat_sys_readv(compat_ulong_t fd,
331 const struct compat_iovec __user *vec, unsigned long vlen); 331 const struct compat_iovec __user *vec, compat_ulong_t vlen);
332asmlinkage ssize_t compat_sys_writev(unsigned long fd, 332asmlinkage ssize_t compat_sys_writev(compat_ulong_t fd,
333 const struct compat_iovec __user *vec, unsigned long vlen); 333 const struct compat_iovec __user *vec, compat_ulong_t vlen);
334asmlinkage ssize_t compat_sys_preadv(unsigned long fd, 334asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd,
335 const struct compat_iovec __user *vec, 335 const struct compat_iovec __user *vec,
336 unsigned long vlen, u32 pos_low, u32 pos_high); 336 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
337asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, 337asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd,
338 const struct compat_iovec __user *vec, 338 const struct compat_iovec __user *vec,
339 unsigned long vlen, u32 pos_low, u32 pos_high); 339 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
340asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int); 340asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int);
341 341
342asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, 342asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv,
@@ -422,7 +422,7 @@ extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
422asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, 422asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
423 compat_long_t addr, compat_long_t data); 423 compat_long_t addr, compat_long_t data);
424 424
425asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, size_t); 425asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
426/* 426/*
427 * epoll (fs/eventpoll.c) compat bits follow ... 427 * epoll (fs/eventpoll.c) compat bits follow ...
428 */ 428 */
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index e4b948080d20..a67b38415768 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -142,8 +142,6 @@ static inline unsigned long zone_page_state_snapshot(struct zone *zone,
142 return x; 142 return x;
143} 143}
144 144
145extern unsigned long global_reclaimable_pages(void);
146
147#ifdef CONFIG_NUMA 145#ifdef CONFIG_NUMA
148/* 146/*
149 * Determine the per node value of a stat item. This function 147 * Determine the per node value of a stat item. This function
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index c38083871f11..2defd1308b04 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -463,7 +463,7 @@ static int active_pfn_set_overlap(unsigned long pfn, int overlap)
463 int i; 463 int i;
464 464
465 if (overlap > ACTIVE_PFN_MAX_OVERLAP || overlap < 0) 465 if (overlap > ACTIVE_PFN_MAX_OVERLAP || overlap < 0)
466 return 0; 466 return overlap;
467 467
468 for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--) 468 for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--)
469 if (overlap & 1 << i) 469 if (overlap & 1 << i)
@@ -486,7 +486,7 @@ static void active_pfn_inc_overlap(unsigned long pfn)
486 * debug_dma_assert_idle() as the pfn may be marked idle 486 * debug_dma_assert_idle() as the pfn may be marked idle
487 * prematurely. 487 * prematurely.
488 */ 488 */
489 WARN_ONCE(overlap == 0, 489 WARN_ONCE(overlap > ACTIVE_PFN_MAX_OVERLAP,
490 "DMA-API: exceeded %d overlapping mappings of pfn %lx\n", 490 "DMA-API: exceeded %d overlapping mappings of pfn %lx\n",
491 ACTIVE_PFN_MAX_OVERLAP, pfn); 491 ACTIVE_PFN_MAX_OVERLAP, pfn);
492} 492}
@@ -517,7 +517,11 @@ static void active_pfn_remove(struct dma_debug_entry *entry)
517 unsigned long flags; 517 unsigned long flags;
518 518
519 spin_lock_irqsave(&radix_lock, flags); 519 spin_lock_irqsave(&radix_lock, flags);
520 if (active_pfn_dec_overlap(entry->pfn) == 0) 520 /* since we are counting overlaps the final put of the
521 * entry->pfn will occur when the overlap count is 0.
522 * active_pfn_dec_overlap() returns -1 in that case
523 */
524 if (active_pfn_dec_overlap(entry->pfn) < 0)
521 radix_tree_delete(&dma_active_pfn, entry->pfn); 525 radix_tree_delete(&dma_active_pfn, entry->pfn);
522 spin_unlock_irqrestore(&radix_lock, flags); 526 spin_unlock_irqrestore(&radix_lock, flags);
523} 527}
diff --git a/lib/genalloc.c b/lib/genalloc.c
index dda31168844f..bdb9a456bcbb 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -316,7 +316,7 @@ EXPORT_SYMBOL(gen_pool_alloc);
316 * gen_pool_dma_alloc - allocate special memory from the pool for DMA usage 316 * gen_pool_dma_alloc - allocate special memory from the pool for DMA usage
317 * @pool: pool to allocate from 317 * @pool: pool to allocate from
318 * @size: number of bytes to allocate from the pool 318 * @size: number of bytes to allocate from the pool
319 * @dma: dma-view physical address 319 * @dma: dma-view physical address return value. Use NULL if unneeded.
320 * 320 *
321 * Allocate the requested number of bytes from the specified pool. 321 * Allocate the requested number of bytes from the specified pool.
322 * Uses the pool allocation function (with first-fit algorithm by default). 322 * Uses the pool allocation function (with first-fit algorithm by default).
@@ -334,7 +334,8 @@ void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size, dma_addr_t *dma)
334 if (!vaddr) 334 if (!vaddr)
335 return NULL; 335 return NULL;
336 336
337 *dma = gen_pool_virt_to_phys(pool, vaddr); 337 if (dma)
338 *dma = gen_pool_virt_to_phys(pool, vaddr);
338 339
339 return (void *)vaddr; 340 return (void *)vaddr;
340} 341}
diff --git a/mm/internal.h b/mm/internal.h
index 612c14f5e0f5..29e1e761f9eb 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -83,7 +83,6 @@ extern unsigned long highest_memmap_pfn;
83 */ 83 */
84extern int isolate_lru_page(struct page *page); 84extern int isolate_lru_page(struct page *page);
85extern void putback_lru_page(struct page *page); 85extern void putback_lru_page(struct page *page);
86extern unsigned long zone_reclaimable_pages(struct zone *zone);
87extern bool zone_reclaimable(struct zone *zone); 86extern bool zone_reclaimable(struct zone *zone);
88 87
89/* 88/*
diff --git a/mm/memblock.c b/mm/memblock.c
index 87d21a6ff63c..39a31e7f0045 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1077,6 +1077,9 @@ static void * __init memblock_virt_alloc_internal(
1077 if (!align) 1077 if (!align)
1078 align = SMP_CACHE_BYTES; 1078 align = SMP_CACHE_BYTES;
1079 1079
1080 if (max_addr > memblock.current_limit)
1081 max_addr = memblock.current_limit;
1082
1080again: 1083again:
1081 alloc = memblock_find_in_range_node(size, align, min_addr, max_addr, 1084 alloc = memblock_find_in_range_node(size, align, min_addr, max_addr,
1082 nid); 1085 nid);
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 36cb46cddf61..873de7e542bc 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2654,7 +2654,7 @@ void mpol_free_shared_policy(struct shared_policy *p)
2654} 2654}
2655 2655
2656#ifdef CONFIG_NUMA_BALANCING 2656#ifdef CONFIG_NUMA_BALANCING
2657static bool __initdata numabalancing_override; 2657static int __initdata numabalancing_override;
2658 2658
2659static void __init check_numabalancing_enable(void) 2659static void __init check_numabalancing_enable(void)
2660{ 2660{
@@ -2663,9 +2663,15 @@ static void __init check_numabalancing_enable(void)
2663 if (IS_ENABLED(CONFIG_NUMA_BALANCING_DEFAULT_ENABLED)) 2663 if (IS_ENABLED(CONFIG_NUMA_BALANCING_DEFAULT_ENABLED))
2664 numabalancing_default = true; 2664 numabalancing_default = true;
2665 2665
2666 /* Parsed by setup_numabalancing. override == 1 enables, -1 disables */
2667 if (numabalancing_override)
2668 set_numabalancing_state(numabalancing_override == 1);
2669
2666 if (nr_node_ids > 1 && !numabalancing_override) { 2670 if (nr_node_ids > 1 && !numabalancing_override) {
2667 printk(KERN_INFO "Enabling automatic NUMA balancing. " 2671 pr_info("%s automatic NUMA balancing. "
2668 "Configure with numa_balancing= or the kernel.numa_balancing sysctl"); 2672 "Configure with numa_balancing= or the "
2673 "kernel.numa_balancing sysctl",
2674 numabalancing_default ? "Enabling" : "Disabling");
2669 set_numabalancing_state(numabalancing_default); 2675 set_numabalancing_state(numabalancing_default);
2670 } 2676 }
2671} 2677}
@@ -2675,18 +2681,17 @@ static int __init setup_numabalancing(char *str)
2675 int ret = 0; 2681 int ret = 0;
2676 if (!str) 2682 if (!str)
2677 goto out; 2683 goto out;
2678 numabalancing_override = true;
2679 2684
2680 if (!strcmp(str, "enable")) { 2685 if (!strcmp(str, "enable")) {
2681 set_numabalancing_state(true); 2686 numabalancing_override = 1;
2682 ret = 1; 2687 ret = 1;
2683 } else if (!strcmp(str, "disable")) { 2688 } else if (!strcmp(str, "disable")) {
2684 set_numabalancing_state(false); 2689 numabalancing_override = -1;
2685 ret = 1; 2690 ret = 1;
2686 } 2691 }
2687out: 2692out:
2688 if (!ret) 2693 if (!ret)
2689 printk(KERN_WARNING "Unable to parse numa_balancing=\n"); 2694 pr_warn("Unable to parse numa_balancing=\n");
2690 2695
2691 return ret; 2696 return ret;
2692} 2697}
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 63807583d8e8..2d30e2cfe804 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -191,6 +191,26 @@ static unsigned long writeout_period_time = 0;
191 * global dirtyable memory first. 191 * global dirtyable memory first.
192 */ 192 */
193 193
194/**
195 * zone_dirtyable_memory - number of dirtyable pages in a zone
196 * @zone: the zone
197 *
198 * Returns the zone's number of pages potentially available for dirty
199 * page cache. This is the base value for the per-zone dirty limits.
200 */
201static unsigned long zone_dirtyable_memory(struct zone *zone)
202{
203 unsigned long nr_pages;
204
205 nr_pages = zone_page_state(zone, NR_FREE_PAGES);
206 nr_pages -= min(nr_pages, zone->dirty_balance_reserve);
207
208 nr_pages += zone_page_state(zone, NR_INACTIVE_FILE);
209 nr_pages += zone_page_state(zone, NR_ACTIVE_FILE);
210
211 return nr_pages;
212}
213
194static unsigned long highmem_dirtyable_memory(unsigned long total) 214static unsigned long highmem_dirtyable_memory(unsigned long total)
195{ 215{
196#ifdef CONFIG_HIGHMEM 216#ifdef CONFIG_HIGHMEM
@@ -198,11 +218,9 @@ static unsigned long highmem_dirtyable_memory(unsigned long total)
198 unsigned long x = 0; 218 unsigned long x = 0;
199 219
200 for_each_node_state(node, N_HIGH_MEMORY) { 220 for_each_node_state(node, N_HIGH_MEMORY) {
201 struct zone *z = 221 struct zone *z = &NODE_DATA(node)->node_zones[ZONE_HIGHMEM];
202 &NODE_DATA(node)->node_zones[ZONE_HIGHMEM];
203 222
204 x += zone_page_state(z, NR_FREE_PAGES) + 223 x += zone_dirtyable_memory(z);
205 zone_reclaimable_pages(z) - z->dirty_balance_reserve;
206 } 224 }
207 /* 225 /*
208 * Unreclaimable memory (kernel memory or anonymous memory 226 * Unreclaimable memory (kernel memory or anonymous memory
@@ -238,9 +256,12 @@ static unsigned long global_dirtyable_memory(void)
238{ 256{
239 unsigned long x; 257 unsigned long x;
240 258
241 x = global_page_state(NR_FREE_PAGES) + global_reclaimable_pages(); 259 x = global_page_state(NR_FREE_PAGES);
242 x -= min(x, dirty_balance_reserve); 260 x -= min(x, dirty_balance_reserve);
243 261
262 x += global_page_state(NR_INACTIVE_FILE);
263 x += global_page_state(NR_ACTIVE_FILE);
264
244 if (!vm_highmem_is_dirtyable) 265 if (!vm_highmem_is_dirtyable)
245 x -= highmem_dirtyable_memory(x); 266 x -= highmem_dirtyable_memory(x);
246 267
@@ -289,32 +310,6 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty)
289} 310}
290 311
291/** 312/**
292 * zone_dirtyable_memory - number of dirtyable pages in a zone
293 * @zone: the zone
294 *
295 * Returns the zone's number of pages potentially available for dirty
296 * page cache. This is the base value for the per-zone dirty limits.
297 */
298static unsigned long zone_dirtyable_memory(struct zone *zone)
299{
300 /*
301 * The effective global number of dirtyable pages may exclude
302 * highmem as a big-picture measure to keep the ratio between
303 * dirty memory and lowmem reasonable.
304 *
305 * But this function is purely about the individual zone and a
306 * highmem zone can hold its share of dirty pages, so we don't
307 * care about vm_highmem_is_dirtyable here.
308 */
309 unsigned long nr_pages = zone_page_state(zone, NR_FREE_PAGES) +
310 zone_reclaimable_pages(zone);
311
312 /* don't allow this to underflow */
313 nr_pages -= min(nr_pages, zone->dirty_balance_reserve);
314 return nr_pages;
315}
316
317/**
318 * zone_dirty_limit - maximum number of dirty pages allowed in a zone 313 * zone_dirty_limit - maximum number of dirty pages allowed in a zone
319 * @zone: the zone 314 * @zone: the zone
320 * 315 *
diff --git a/mm/readahead.c b/mm/readahead.c
index 7cdbb44aa90b..0de2360d65f3 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -211,8 +211,6 @@ out:
211int force_page_cache_readahead(struct address_space *mapping, struct file *filp, 211int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
212 pgoff_t offset, unsigned long nr_to_read) 212 pgoff_t offset, unsigned long nr_to_read)
213{ 213{
214 int ret = 0;
215
216 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages)) 214 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages))
217 return -EINVAL; 215 return -EINVAL;
218 216
@@ -226,15 +224,13 @@ int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
226 this_chunk = nr_to_read; 224 this_chunk = nr_to_read;
227 err = __do_page_cache_readahead(mapping, filp, 225 err = __do_page_cache_readahead(mapping, filp,
228 offset, this_chunk, 0); 226 offset, this_chunk, 0);
229 if (err < 0) { 227 if (err < 0)
230 ret = err; 228 return err;
231 break; 229
232 }
233 ret += err;
234 offset += this_chunk; 230 offset += this_chunk;
235 nr_to_read -= this_chunk; 231 nr_to_read -= this_chunk;
236 } 232 }
237 return ret; 233 return 0;
238} 234}
239 235
240/* 236/*
@@ -576,8 +572,7 @@ do_readahead(struct address_space *mapping, struct file *filp,
576 if (!mapping || !mapping->a_ops) 572 if (!mapping || !mapping->a_ops)
577 return -EINVAL; 573 return -EINVAL;
578 574
579 force_page_cache_readahead(mapping, filp, index, nr); 575 return force_page_cache_readahead(mapping, filp, index, nr);
580 return 0;
581} 576}
582 577
583SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count) 578SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 8e40321da091..1ec3c619ba04 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -233,14 +233,17 @@ out_unlock:
233 mutex_unlock(&slab_mutex); 233 mutex_unlock(&slab_mutex);
234 put_online_cpus(); 234 put_online_cpus();
235 235
236 /* 236 if (err) {
237 * There is no point in flooding logs with warnings or especially 237 /*
238 * crashing the system if we fail to create a cache for a memcg. In 238 * There is no point in flooding logs with warnings or
239 * this case we will be accounting the memcg allocation to the root 239 * especially crashing the system if we fail to create a cache
240 * cgroup until we succeed to create its own cache, but it isn't that 240 * for a memcg. In this case we will be accounting the memcg
241 * critical. 241 * allocation to the root cgroup until we succeed to create its
242 */ 242 * own cache, but it isn't that critical.
243 if (err && !memcg) { 243 */
244 if (!memcg)
245 return NULL;
246
244 if (flags & SLAB_PANIC) 247 if (flags & SLAB_PANIC)
245 panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", 248 panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n",
246 name, err); 249 name, err);
diff --git a/mm/slub.c b/mm/slub.c
index 34bb8c65a2d8..545a170ebf9f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1559,7 +1559,7 @@ static inline void *acquire_slab(struct kmem_cache *s,
1559 new.freelist = freelist; 1559 new.freelist = freelist;
1560 } 1560 }
1561 1561
1562 VM_BUG_ON_PAGE(new.frozen, &new); 1562 VM_BUG_ON(new.frozen);
1563 new.frozen = 1; 1563 new.frozen = 1;
1564 1564
1565 if (!__cmpxchg_double_slab(s, page, 1565 if (!__cmpxchg_double_slab(s, page,
@@ -1812,7 +1812,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
1812 set_freepointer(s, freelist, prior); 1812 set_freepointer(s, freelist, prior);
1813 new.counters = counters; 1813 new.counters = counters;
1814 new.inuse--; 1814 new.inuse--;
1815 VM_BUG_ON_PAGE(!new.frozen, &new); 1815 VM_BUG_ON(!new.frozen);
1816 1816
1817 } while (!__cmpxchg_double_slab(s, page, 1817 } while (!__cmpxchg_double_slab(s, page,
1818 prior, counters, 1818 prior, counters,
@@ -1840,7 +1840,7 @@ redo:
1840 1840
1841 old.freelist = page->freelist; 1841 old.freelist = page->freelist;
1842 old.counters = page->counters; 1842 old.counters = page->counters;
1843 VM_BUG_ON_PAGE(!old.frozen, &old); 1843 VM_BUG_ON(!old.frozen);
1844 1844
1845 /* Determine target state of the slab */ 1845 /* Determine target state of the slab */
1846 new.counters = old.counters; 1846 new.counters = old.counters;
@@ -1952,7 +1952,7 @@ static void unfreeze_partials(struct kmem_cache *s,
1952 1952
1953 old.freelist = page->freelist; 1953 old.freelist = page->freelist;
1954 old.counters = page->counters; 1954 old.counters = page->counters;
1955 VM_BUG_ON_PAGE(!old.frozen, &old); 1955 VM_BUG_ON(!old.frozen);
1956 1956
1957 new.counters = old.counters; 1957 new.counters = old.counters;
1958 new.freelist = old.freelist; 1958 new.freelist = old.freelist;
@@ -2225,7 +2225,7 @@ static inline void *get_freelist(struct kmem_cache *s, struct page *page)
2225 counters = page->counters; 2225 counters = page->counters;
2226 2226
2227 new.counters = counters; 2227 new.counters = counters;
2228 VM_BUG_ON_PAGE(!new.frozen, &new); 2228 VM_BUG_ON(!new.frozen);
2229 2229
2230 new.inuse = page->objects; 2230 new.inuse = page->objects;
2231 new.frozen = freelist != NULL; 2231 new.frozen = freelist != NULL;
@@ -2319,7 +2319,7 @@ load_freelist:
2319 * page is pointing to the page from which the objects are obtained. 2319 * page is pointing to the page from which the objects are obtained.
2320 * That page must be frozen for per cpu allocations to work. 2320 * That page must be frozen for per cpu allocations to work.
2321 */ 2321 */
2322 VM_BUG_ON_PAGE(!c->page->frozen, c->page); 2322 VM_BUG_ON(!c->page->frozen);
2323 c->freelist = get_freepointer(s, freelist); 2323 c->freelist = get_freepointer(s, freelist);
2324 c->tid = next_tid(c->tid); 2324 c->tid = next_tid(c->tid);
2325 local_irq_restore(flags); 2325 local_irq_restore(flags);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 90c4075d8d75..a9c74b409681 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -147,7 +147,7 @@ static bool global_reclaim(struct scan_control *sc)
147} 147}
148#endif 148#endif
149 149
150unsigned long zone_reclaimable_pages(struct zone *zone) 150static unsigned long zone_reclaimable_pages(struct zone *zone)
151{ 151{
152 int nr; 152 int nr;
153 153
@@ -3315,27 +3315,6 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx)
3315 wake_up_interruptible(&pgdat->kswapd_wait); 3315 wake_up_interruptible(&pgdat->kswapd_wait);
3316} 3316}
3317 3317
3318/*
3319 * The reclaimable count would be mostly accurate.
3320 * The less reclaimable pages may be
3321 * - mlocked pages, which will be moved to unevictable list when encountered
3322 * - mapped pages, which may require several travels to be reclaimed
3323 * - dirty pages, which is not "instantly" reclaimable
3324 */
3325unsigned long global_reclaimable_pages(void)
3326{
3327 int nr;
3328
3329 nr = global_page_state(NR_ACTIVE_FILE) +
3330 global_page_state(NR_INACTIVE_FILE);
3331
3332 if (get_nr_swap_pages() > 0)
3333 nr += global_page_state(NR_ACTIVE_ANON) +
3334 global_page_state(NR_INACTIVE_ANON);
3335
3336 return nr;
3337}
3338
3339#ifdef CONFIG_HIBERNATION 3318#ifdef CONFIG_HIBERNATION
3340/* 3319/*
3341 * Try to free `nr_to_reclaim' of memory, system-wide, and return the number of 3320 * Try to free `nr_to_reclaim' of memory, system-wide, and return the number of