-#ifdef CONFIG_TMPFS
- if (shmem_parse_options(data, &mode, &uid, &gid, &blocks, &inodes)) {
- err = -EINVAL;
- goto failed;
+ if (blocks || inodes) {
+ struct shmem_sb_info *sbinfo;
+ sbinfo = kmalloc(sizeof(struct shmem_sb_info), GFP_KERNEL);
+ if (!sbinfo)
+ return -ENOMEM;
+ sb->s_fs_info = sbinfo;
+ spin_lock_init(&sbinfo->stat_lock);
+ sbinfo->max_blocks = blocks;
+ sbinfo->free_blocks = blocks;
+ sbinfo->max_inodes = inodes;
+ sbinfo->free_inodes = inodes;