Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356626
b: refs/heads/master
c: 49cd0a5
h: refs/heads/master
v: v3
  • Loading branch information
Greg Thelen authored and Linus Torvalds committed Feb 24, 2013
1 parent ea26545 commit 90baa5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 5f00110f7273f9ff04ac69a5f85bb535a4fd0987
refs/heads/master: 49cd0a5c290f99deca3463d16c3c1c7240107889
13 changes: 10 additions & 3 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
bool remount)
{
char *this_char, *value, *rest;
struct mempolicy *mpol = NULL;
uid_t uid;
gid_t gid;

Expand Down Expand Up @@ -2413,7 +2414,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
printk(KERN_ERR
"tmpfs: No value for mount option '%s'\n",
this_char);
return 1;
goto error;
}

if (!strcmp(this_char,"size")) {
Expand Down Expand Up @@ -2462,19 +2463,24 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
if (!gid_valid(sbinfo->gid))
goto bad_val;
} else if (!strcmp(this_char,"mpol")) {
if (mpol_parse_str(value, &sbinfo->mpol))
mpol_put(mpol);
mpol = NULL;
if (mpol_parse_str(value, &mpol))
goto bad_val;
} else {
printk(KERN_ERR "tmpfs: Bad mount option %s\n",
this_char);
return 1;
goto error;
}
}
sbinfo->mpol = mpol;
return 0;

bad_val:
printk(KERN_ERR "tmpfs: Bad value '%s' for mount option '%s'\n",
value, this_char);
error:
mpol_put(mpol);
return 1;

}
Expand Down Expand Up @@ -2550,6 +2556,7 @@ static void shmem_put_super(struct super_block *sb)
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);

percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
kfree(sbinfo);
sb->s_fs_info = NULL;
}
Expand Down

0 comments on commit 90baa5c

Please sign in to comment.