Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344795
b: refs/heads/master
c: a720094
h: refs/heads/master
i:
  344793: b4b99af
  344791: 9e71691
v: v3
  • Loading branch information
Mel Gorman committed Dec 11, 2012
1 parent cadb58f commit f1e8cfc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 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: 4b10e7d562c90d0a72f324832c26653947a07381
refs/heads/master: a720094ded8cbb303111035be91858011d2eac71
4 changes: 1 addition & 3 deletions trunk/include/uapi/linux/mempolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ enum {
MPOL_BIND,
MPOL_INTERLEAVE,
MPOL_LOCAL,
MPOL_NOOP, /* retain existing policy for range */
MPOL_MAX, /* always last member of enum */
};

Expand Down Expand Up @@ -57,8 +56,7 @@ enum mpol_rebind_step {

#define MPOL_MF_VALID (MPOL_MF_STRICT | \
MPOL_MF_MOVE | \
MPOL_MF_MOVE_ALL | \
MPOL_MF_LAZY)
MPOL_MF_MOVE_ALL)

/*
* Internal flags that share the struct mempolicy flags word with
Expand Down
9 changes: 4 additions & 5 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags,
pr_debug("setting mode %d flags %d nodes[0] %lx\n",
mode, flags, nodes ? nodes_addr(*nodes)[0] : -1);

if (mode == MPOL_DEFAULT || mode == MPOL_NOOP) {
if (mode == MPOL_DEFAULT) {
if (nodes && !nodes_empty(*nodes))
return ERR_PTR(-EINVAL);
return NULL;
Expand Down Expand Up @@ -1186,7 +1186,7 @@ static long do_mbind(unsigned long start, unsigned long len,
if (start & ~PAGE_MASK)
return -EINVAL;

if (mode == MPOL_DEFAULT || mode == MPOL_NOOP)
if (mode == MPOL_DEFAULT)
flags &= ~MPOL_MF_STRICT;

len = (len + PAGE_SIZE - 1) & PAGE_MASK;
Expand Down Expand Up @@ -1241,7 +1241,7 @@ static long do_mbind(unsigned long start, unsigned long len,
flags | MPOL_MF_INVERT, &pagelist);

err = PTR_ERR(vma); /* maybe ... */
if (!IS_ERR(vma) && mode != MPOL_NOOP)
if (!IS_ERR(vma))
err = mbind_range(mm, start, end, new);

if (!err) {
Expand Down Expand Up @@ -2530,7 +2530,6 @@ static const char * const policy_modes[] =
[MPOL_BIND] = "bind",
[MPOL_INTERLEAVE] = "interleave",
[MPOL_LOCAL] = "local",
[MPOL_NOOP] = "noop", /* should not actually be used */
};


Expand Down Expand Up @@ -2581,7 +2580,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
break;
}
}
if (mode >= MPOL_MAX || mode == MPOL_NOOP)
if (mode >= MPOL_MAX)
goto out;

switch (mode) {
Expand Down

0 comments on commit f1e8cfc

Please sign in to comment.