From: Ben Pfaff Date: Tue, 6 Jan 2009 22:44:49 +0000 (-0800) Subject: Convert GFP_ATOMIC to GFP_KERNEL where possible. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=487522c3e082b187c7ddca43f8906d1be203d161;p=openvswitch Convert GFP_ATOMIC to GFP_KERNEL where possible. GFP_KERNEL is preferable, because it is more likely to succeed. This code is allowed to sleep, so GFP_ATOMIC is not necessary. --- diff --git a/datapath/brcompat.c b/datapath/brcompat.c index b0bbef6b..5c3b40fa 100644 --- a/datapath/brcompat.c +++ b/datapath/brcompat.c @@ -267,7 +267,7 @@ static int brc_genl_query(struct sk_buff *skb, struct genl_info *info) struct sk_buff *ans_skb; void *data; - ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); + ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!ans_skb) return -ENOMEM; @@ -342,7 +342,7 @@ int brc_send_dp_add_del(const char *dp_name, int add) init_completion(&dp_act_done); genlmsg_end(skb, data); - retval = genlmsg_multicast(skb, 0, brc_mc_group.id, GFP_ATOMIC); + retval = genlmsg_multicast(skb, 0, brc_mc_group.id, GFP_KERNEL); if (retval < 0) return retval; @@ -398,7 +398,7 @@ int brc_send_port_add_del(struct net_device *dev, struct net_device *port, NLA_PUT_STRING(skb, BRC_GENL_A_PORT_NAME, port->name); genlmsg_end(skb, data); - return genlmsg_multicast(skb, 0, brc_mc_group.id, GFP_ATOMIC); + return genlmsg_multicast(skb, 0, brc_mc_group.id, GFP_KERNEL); nla_put_failure: err: