Rev 1125 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1125 | Rev 1126 | ||
---|---|---|---|
Line 238... | Line 238... | ||
238 | */ |
238 | */ |
239 | int idr_pre_get(struct idr *idp, u32_t gfp_mask) |
239 | int idr_pre_get(struct idr *idp, u32_t gfp_mask) |
240 | { |
240 | { |
241 | while (idp->id_free_cnt < IDR_FREE_MAX) { |
241 | while (idp->id_free_cnt < IDR_FREE_MAX) { |
242 | struct idr_layer *new; |
242 | struct idr_layer *new; |
243 | new = kzalloc(sizeof(new), gfp_mask); |
243 | new = kzalloc(sizeof(struct idr_layer), gfp_mask); |
244 | if (new == NULL) |
244 | if (new == NULL) |
245 | return (0); |
245 | return (0); |
246 | move_to_free_list(idp, new); |
246 | move_to_free_list(idp, new); |
247 | } |
247 | } |
248 | return 1; |
248 | return 1; |