Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198225
b: refs/heads/master
c: b4652e8
h: refs/heads/master
i:
  198223: a6ae2c7
v: v3
  • Loading branch information
Lee Schermerhorn authored and Linus Torvalds committed May 25, 2010
1 parent bbb0a90 commit ebe3c6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: e17f74af351cce9a1bade7b33af179497fdf95cf
refs/heads/master: b4652e8429100ba5c3ddb49499faa1188c98c246
10 changes: 4 additions & 6 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,12 +2148,11 @@ static const char * const policy_types[] =
int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
{
struct mempolicy *new = NULL;
unsigned short uninitialized_var(mode);
unsigned short mode;
unsigned short uninitialized_var(mode_flags);
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int i;
int err = 1;

if (nodelist) {
Expand All @@ -2169,13 +2168,12 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
if (flags)
*flags++ = '\0'; /* terminate mode string */

for (i = 0; i <= MPOL_LOCAL; i++) {
if (!strcmp(str, policy_types[i])) {
mode = i;
for (mode = 0; mode <= MPOL_LOCAL; mode++) {
if (!strcmp(str, policy_types[mode])) {
break;
}
}
if (i > MPOL_LOCAL)
if (mode > MPOL_LOCAL)
goto out;

switch (mode) {
Expand Down

0 comments on commit ebe3c6d

Please sign in to comment.