shmem.c (bf11b9a8e9a93c1fc0ebfc2929622d5cf7d43888) | shmem.c (f2b346e4522c2849a3dc59b7077b8952918ef486) |
---|---|
1/* 2 * Resizable virtual memory filesystem for Linux. 3 * 4 * Copyright (C) 2000 Linus Torvalds. 5 * 2000 Transmeta Corp. 6 * 2000-2001 Christoph Rohland 7 * 2000-2001 SAP AG 8 * 2002 Red Hat Inc. --- 3602 unchanged lines hidden (view full) --- 3611 sb->s_fs_info = NULL; 3612} 3613 3614static int shmem_fill_super(struct super_block *sb, struct fs_context *fc) 3615{ 3616 struct shmem_options *ctx = fc->fs_private; 3617 struct inode *inode; 3618 struct shmem_sb_info *sbinfo; | 1/* 2 * Resizable virtual memory filesystem for Linux. 3 * 4 * Copyright (C) 2000 Linus Torvalds. 5 * 2000 Transmeta Corp. 6 * 2000-2001 Christoph Rohland 7 * 2000-2001 SAP AG 8 * 2002 Red Hat Inc. --- 3602 unchanged lines hidden (view full) --- 3611 sb->s_fs_info = NULL; 3612} 3613 3614static int shmem_fill_super(struct super_block *sb, struct fs_context *fc) 3615{ 3616 struct shmem_options *ctx = fc->fs_private; 3617 struct inode *inode; 3618 struct shmem_sb_info *sbinfo; |
3619 int err = -ENOMEM; | |
3620 3621 /* Round up to L1_CACHE_BYTES to resist false sharing */ 3622 sbinfo = kzalloc(max((int)sizeof(struct shmem_sb_info), 3623 L1_CACHE_BYTES), GFP_KERNEL); 3624 if (!sbinfo) 3625 return -ENOMEM; 3626 3627 sb->s_fs_info = sbinfo; --- 61 unchanged lines hidden (view full) --- 3689 inode->i_gid = sbinfo->gid; 3690 sb->s_root = d_make_root(inode); 3691 if (!sb->s_root) 3692 goto failed; 3693 return 0; 3694 3695failed: 3696 shmem_put_super(sb); | 3619 3620 /* Round up to L1_CACHE_BYTES to resist false sharing */ 3621 sbinfo = kzalloc(max((int)sizeof(struct shmem_sb_info), 3622 L1_CACHE_BYTES), GFP_KERNEL); 3623 if (!sbinfo) 3624 return -ENOMEM; 3625 3626 sb->s_fs_info = sbinfo; --- 61 unchanged lines hidden (view full) --- 3688 inode->i_gid = sbinfo->gid; 3689 sb->s_root = d_make_root(inode); 3690 if (!sb->s_root) 3691 goto failed; 3692 return 0; 3693 3694failed: 3695 shmem_put_super(sb); |
3697 return err; | 3696 return -ENOMEM; |
3698} 3699 3700static int shmem_get_tree(struct fs_context *fc) 3701{ 3702 return get_tree_nodev(fc, shmem_fill_super); 3703} 3704 3705static void shmem_free_fc(struct fs_context *fc) --- 527 unchanged lines hidden --- | 3697} 3698 3699static int shmem_get_tree(struct fs_context *fc) 3700{ 3701 return get_tree_nodev(fc, shmem_fill_super); 3702} 3703 3704static void shmem_free_fc(struct fs_context *fc) --- 527 unchanged lines hidden --- |