diff options
author | Ganesh Mahendran <opensource.ganesh@gmail.com> | 2014-12-13 01:57:07 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 21:42:50 +0100 |
commit | df8b5bb998f10cfc040ad30300f9a9ea4592ff82 (patch) | |
tree | 43d3c41069a79d68b507701aef4e9ffbb68c6a76 /scripts | |
parent | mm/zram: correct ZRAM_ZERO flag bit position (diff) | |
download | linux-df8b5bb998f10cfc040ad30300f9a9ea4592ff82.tar.xz linux-df8b5bb998f10cfc040ad30300f9a9ea4592ff82.zip |
mm/zsmalloc: avoid duplicate assignment of prev_class
In zs_create_pool(), prev_class is assigned (ZS_SIZE_CLASSES - 1) times.
And the prev_class only references to the previous size_class. So we do
not need unnecessary assignement.
This patch assigns *prev_class* when a new size_class structure is
allocated and uses prev_class to check whether the first class has been
allocated.
[akpm@linux-foundation.org: remove now-unused ZS_SIZE_CLASSES]
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Reviewed-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions