Convert GFP_ATOMIC to GFP_KERNEL where possible.
authorBen Pfaff <blp@nicira.com>
Tue, 6 Jan 2009 22:44:49 +0000 (14:44 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 6 Jan 2009 23:43:04 +0000 (15:43 -0800)
GFP_KERNEL is preferable, because it is more likely to succeed.  This code
is allowed to sleep, so GFP_ATOMIC is not necessary.

datapath/brcompat.c

index b0bbef6b1af48f29915c1073149588273debed4d..5c3b40fa03bd281d739a8dff443fabb267b23102 100644 (file)
@@ -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: