Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356625
b: refs/heads/master
c: 5f00110
h: refs/heads/master
i:
  356623: 0347360
v: v3
  • Loading branch information
Greg Thelen authored and Linus Torvalds committed Feb 24, 2013
1 parent 63836dc commit ea26545
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 67d46b296a1ba1477c0df8ff3bc5e0167a0b0732
refs/heads/master: 5f00110f7273f9ff04ac69a5f85bb535a4fd0987
10 changes: 8 additions & 2 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
unsigned long inodes;
int error = -EINVAL;

config.mpol = NULL;
if (shmem_parse_options(data, &config, true))
return error;

Expand All @@ -2510,8 +2511,13 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
sbinfo->max_inodes = config.max_inodes;
sbinfo->free_inodes = config.max_inodes - inodes;

mpol_put(sbinfo->mpol);
sbinfo->mpol = config.mpol; /* transfers initial ref */
/*
* Preserve previous mempolicy unless mpol remount option was specified.
*/
if (config.mpol) {
mpol_put(sbinfo->mpol);
sbinfo->mpol = config.mpol; /* transfers initial ref */
}
out:
spin_unlock(&sbinfo->stat_lock);
return error;
Expand Down

0 comments on commit ea26545

Please sign in to comment.