super.c (637b424bf8747e50bab6648ab919632d6efd6c28) super.c (7dd29d8d865efdb00c0542a5d2c87af8c52ea6c7)
1/*
2 * linux/fs/hpfs/super.c
3 *
4 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999
5 *
6 * mounting, unmounting, error handling
7 */
8

--- 88 unchanged lines hidden (view full) ---

97 if (!((*c2 - 1) & *c2)) *c1 = key;
98 return 0;
99}
100
101static void hpfs_put_super(struct super_block *s)
102{
103 struct hpfs_sb_info *sbi = hpfs_sb(s);
104
1/*
2 * linux/fs/hpfs/super.c
3 *
4 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999
5 *
6 * mounting, unmounting, error handling
7 */
8

--- 88 unchanged lines hidden (view full) ---

97 if (!((*c2 - 1) & *c2)) *c1 = key;
98 return 0;
99}
100
101static void hpfs_put_super(struct super_block *s)
102{
103 struct hpfs_sb_info *sbi = hpfs_sb(s);
104
105 hpfs_lock(s);
106 unmark_dirty(s);
107 hpfs_unlock(s);
108
105 kfree(sbi->sb_cp_table);
106 kfree(sbi->sb_bmp_dir);
109 kfree(sbi->sb_cp_table);
110 kfree(sbi->sb_bmp_dir);
107 unmark_dirty(s);
108 s->s_fs_info = NULL;
109 kfree(sbi);
110}
111
112unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno)
113{
114 struct quad_buffer_head qbh;
115 unsigned long *bits;

--- 369 unchanged lines hidden (view full) ---

485 if (!sbi) {
486 return -ENOMEM;
487 }
488 s->s_fs_info = sbi;
489
490 sbi->sb_bmp_dir = NULL;
491 sbi->sb_cp_table = NULL;
492
111 s->s_fs_info = NULL;
112 kfree(sbi);
113}
114
115unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno)
116{
117 struct quad_buffer_head qbh;
118 unsigned long *bits;

--- 369 unchanged lines hidden (view full) ---

488 if (!sbi) {
489 return -ENOMEM;
490 }
491 s->s_fs_info = sbi;
492
493 sbi->sb_bmp_dir = NULL;
494 sbi->sb_cp_table = NULL;
495
496 mutex_init(&sbi->hpfs_mutex);
497 hpfs_lock(s);
498
493 mutex_init(&sbi->hpfs_creation_de);
494
495 uid = current_uid();
496 gid = current_gid();
497 umask = current_umask();
498 lowercase = 0;
499 conv = CONV_BINARY;
500 eas = 2;

--- 163 unchanged lines hidden (view full) ---

664 hpfs_i(root)->i_ea_size = de->ea_size;
665 hpfs_i(root)->i_parent_dir = root->i_ino;
666 if (root->i_size == -1)
667 root->i_size = 2048;
668 if (root->i_blocks == -1)
669 root->i_blocks = 5;
670 hpfs_brelse4(&qbh);
671 }
499 mutex_init(&sbi->hpfs_creation_de);
500
501 uid = current_uid();
502 gid = current_gid();
503 umask = current_umask();
504 lowercase = 0;
505 conv = CONV_BINARY;
506 eas = 2;

--- 163 unchanged lines hidden (view full) ---

670 hpfs_i(root)->i_ea_size = de->ea_size;
671 hpfs_i(root)->i_parent_dir = root->i_ino;
672 if (root->i_size == -1)
673 root->i_size = 2048;
674 if (root->i_blocks == -1)
675 root->i_blocks = 5;
676 hpfs_brelse4(&qbh);
677 }
678 hpfs_unlock(s);
672 return 0;
673
674bail4: brelse(bh2);
675bail3: brelse(bh1);
676bail2: brelse(bh0);
677bail1:
678bail0:
679 return 0;
680
681bail4: brelse(bh2);
682bail3: brelse(bh1);
683bail2: brelse(bh0);
684bail1:
685bail0:
686 hpfs_unlock(s);
679 kfree(sbi->sb_bmp_dir);
680 kfree(sbi->sb_cp_table);
681 s->s_fs_info = NULL;
682 kfree(sbi);
683 return -EINVAL;
684}
685
686static struct dentry *hpfs_mount(struct file_system_type *fs_type,

--- 37 unchanged lines hidden ---
687 kfree(sbi->sb_bmp_dir);
688 kfree(sbi->sb_cp_table);
689 s->s_fs_info = NULL;
690 kfree(sbi);
691 return -EINVAL;
692}
693
694static struct dentry *hpfs_mount(struct file_system_type *fs_type,

--- 37 unchanged lines hidden ---