Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360823
b: refs/heads/master
c: 3f73686
h: refs/heads/master
i:
  360821: d061751
  360819: 0dfb997
  360815: 52377a2
v: v3
  • Loading branch information
Cong Wang authored and David S. Miller committed Mar 4, 2013
1 parent 5dd8b2f commit 77a6e85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ece6b0a2b25652d684a7ced4ae680a863af041e0
refs/heads/master: 3f736868b47687d1336fe88185560b22bb92021e
8 changes: 3 additions & 5 deletions trunk/net/sctp/ssnmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>

#define MAX_KMALLOC_SIZE 131072

static struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *map, __u16 in,
__u16 out);

Expand All @@ -65,7 +63,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
int size;

size = sctp_ssnmap_size(in, out);
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
retval = kmalloc(size, gfp);
else
retval = (struct sctp_ssnmap *)
Expand All @@ -82,7 +80,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
return retval;

fail_map:
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
kfree(retval);
else
free_pages((unsigned long)retval, get_order(size));
Expand Down Expand Up @@ -124,7 +122,7 @@ void sctp_ssnmap_free(struct sctp_ssnmap *map)
int size;

size = sctp_ssnmap_size(map->in.len, map->out.len);
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
kfree(map);
else
free_pages((unsigned long)map, get_order(size));
Expand Down

0 comments on commit 77a6e85

Please sign in to comment.