Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netlabel: use GFP flags from caller instead of GFP_ATOMIC

This function takes a GFP flags as a parameter, but they are never used.
We don't take a lock in this function so there is no reason to prefer
GFP_ATOMIC over the caller's GFP flags.

There is only one caller, cipso_v4_map_cat_rng_ntoh(), and it passes
GFP_ATOMIC as the GFP flags so this doesn't change how the code works.
It's just a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dan Carpenter and committed by
David S. Miller
64b5fad5 9395a09d

+1 -1
+1 -1
net/netlabel/netlabel_kapi.c
··· 597 597 iter = iter->next; 598 598 iter_max_spot = iter->startbit + NETLBL_CATMAP_SIZE; 599 599 } 600 - ret_val = netlbl_secattr_catmap_setbit(iter, spot, GFP_ATOMIC); 600 + ret_val = netlbl_secattr_catmap_setbit(iter, spot, flags); 601 601 } 602 602 603 603 return ret_val;