diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-10 01:27:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 01:27:33 -0400 |
commit | e548833df83c3554229eff0672900bfe958b45fd (patch) | |
tree | 85efc4a76dc356593d6d394776aeb845dc580fb6 /mm/shmem.c | |
parent | cbd9da7be869f676afc204e1a664163778c770bd (diff) | |
parent | 053d8f6622701f849fda2ca2c9ae596c13599ba9 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/main.c
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index dfaa0f4e978..080b09a57a8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2325,7 +2325,10 @@ static int shmem_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
2325 | 2325 | ||
2326 | static void shmem_put_super(struct super_block *sb) | 2326 | static void shmem_put_super(struct super_block *sb) |
2327 | { | 2327 | { |
2328 | kfree(sb->s_fs_info); | 2328 | struct shmem_sb_info *sbinfo = SHMEM_SB(sb); |
2329 | |||
2330 | percpu_counter_destroy(&sbinfo->used_blocks); | ||
2331 | kfree(sbinfo); | ||
2329 | sb->s_fs_info = NULL; | 2332 | sb->s_fs_info = NULL; |
2330 | } | 2333 | } |
2331 | 2334 | ||
@@ -2367,7 +2370,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) | |||
2367 | #endif | 2370 | #endif |
2368 | 2371 | ||
2369 | spin_lock_init(&sbinfo->stat_lock); | 2372 | spin_lock_init(&sbinfo->stat_lock); |
2370 | percpu_counter_init(&sbinfo->used_blocks, 0); | 2373 | if (percpu_counter_init(&sbinfo->used_blocks, 0)) |
2374 | goto failed; | ||
2371 | sbinfo->free_inodes = sbinfo->max_inodes; | 2375 | sbinfo->free_inodes = sbinfo->max_inodes; |
2372 | 2376 | ||
2373 | sb->s_maxbytes = SHMEM_MAX_BYTES; | 2377 | sb->s_maxbytes = SHMEM_MAX_BYTES; |