aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/super.c b/fs/super.c
index 425861cb1caa..8743e9bbb297 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -55,11 +55,10 @@ DEFINE_SPINLOCK(sb_lock);
55 */ 55 */
56static struct super_block *alloc_super(void) 56static struct super_block *alloc_super(void)
57{ 57{
58 struct super_block *s = kmalloc(sizeof(struct super_block), GFP_USER); 58 struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
59 static struct super_operations default_op; 59 static struct super_operations default_op;
60 60
61 if (s) { 61 if (s) {
62 memset(s, 0, sizeof(struct super_block));
63 if (security_sb_alloc(s)) { 62 if (security_sb_alloc(s)) {
64 kfree(s); 63 kfree(s);
65 s = NULL; 64 s = NULL;
@@ -712,7 +711,7 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type,
712 s->s_flags = flags; 711 s->s_flags = flags;
713 strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id)); 712 strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id));
714 sb_set_blocksize(s, block_size(bdev)); 713 sb_set_blocksize(s, block_size(bdev));
715 error = fill_super(s, data, flags & MS_VERBOSE ? 1 : 0); 714 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
716 if (error) { 715 if (error) {
717 up_write(&s->s_umount); 716 up_write(&s->s_umount);
718 deactivate_super(s); 717 deactivate_super(s);
@@ -756,7 +755,7 @@ struct super_block *get_sb_nodev(struct file_system_type *fs_type,
756 755
757 s->s_flags = flags; 756 s->s_flags = flags;
758 757
759 error = fill_super(s, data, flags & MS_VERBOSE ? 1 : 0); 758 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
760 if (error) { 759 if (error) {
761 up_write(&s->s_umount); 760 up_write(&s->s_umount);
762 deactivate_super(s); 761 deactivate_super(s);
@@ -785,7 +784,7 @@ struct super_block *get_sb_single(struct file_system_type *fs_type,
785 return s; 784 return s;
786 if (!s->s_root) { 785 if (!s->s_root) {
787 s->s_flags = flags; 786 s->s_flags = flags;
788 error = fill_super(s, data, flags & MS_VERBOSE ? 1 : 0); 787 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
789 if (error) { 788 if (error) {
790 up_write(&s->s_umount); 789 up_write(&s->s_umount);
791 deactivate_super(s); 790 deactivate_super(s);