Skip to content

Commit

Permalink
mm: frontswap: remove unnecessary check during initialization
Browse files Browse the repository at this point in the history
The check whether frontswap is enabled or not is done in the API functions in
the frontswap header, before they are passed to the internal
double-underscored frontswap functions.

Remove the check from __frontswap_init for consistency.

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
sashalevin authored and konradwilk committed Jun 11, 2012
1 parent d9674dd commit f9f0810
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/frontswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ void __frontswap_init(unsigned type)
BUG_ON(sis == NULL);
if (sis->frontswap_map == NULL)
return;
if (frontswap_enabled)
frontswap_ops.init(type);
frontswap_ops.init(type);
}
EXPORT_SYMBOL(__frontswap_init);

Expand Down

0 comments on commit f9f0810

Please sign in to comment.