diff options
| -rw-r--r-- | fs/adfs/super.c | 4 | ||||
| -rw-r--r-- | fs/affs/super.c | 5 | ||||
| -rw-r--r-- | fs/afs/super.c | 4 | ||||
| -rw-r--r-- | fs/befs/linuxvfs.c | 5 | ||||
| -rw-r--r-- | fs/bfs/inode.c | 4 | ||||
| -rw-r--r-- | fs/cifs/cifsfs.c | 6 | ||||
| -rw-r--r-- | fs/ecryptfs/super.c | 5 | ||||
| -rw-r--r-- | fs/exofs/super.c | 4 | ||||
| -rw-r--r-- | fs/ext2/super.c | 4 | ||||
| -rw-r--r-- | fs/ext3/super.c | 5 | ||||
| -rw-r--r-- | fs/ext4/super.c | 2 | ||||
| -rw-r--r-- | fs/fat/inode.c | 4 | ||||
| -rw-r--r-- | fs/freevxfs/vxfs_super.c | 4 | ||||
| -rw-r--r-- | fs/gfs2/super.c | 4 | ||||
| -rw-r--r-- | fs/hfs/super.c | 4 | ||||
| -rw-r--r-- | fs/hfsplus/super.c | 5 | ||||
| -rw-r--r-- | fs/hpfs/super.c | 5 | ||||
| -rw-r--r-- | fs/isofs/inode.c | 5 | ||||
| -rw-r--r-- | fs/jffs2/super.c | 4 | ||||
| -rw-r--r-- | fs/jfs/super.c | 5 | ||||
| -rw-r--r-- | fs/minix/inode.c | 4 | ||||
| -rw-r--r-- | fs/ncpfs/inode.c | 4 | ||||
| -rw-r--r-- | fs/nilfs2/super.c | 4 | ||||
| -rw-r--r-- | fs/ntfs/super.c | 6 | ||||
| -rw-r--r-- | fs/ocfs2/super.c | 4 | ||||
| -rw-r--r-- | fs/reiserfs/super.c | 4 | ||||
| -rw-r--r-- | fs/smbfs/inode.c | 4 | ||||
| -rw-r--r-- | fs/squashfs/super.c | 4 | ||||
| -rw-r--r-- | fs/super.c | 3 | ||||
| -rw-r--r-- | fs/sysv/inode.c | 4 | ||||
| -rw-r--r-- | fs/ubifs/super.c | 5 | ||||
| -rw-r--r-- | fs/udf/super.c | 5 | ||||
| -rw-r--r-- | fs/ufs/super.c | 6 |
33 files changed, 133 insertions, 12 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index dd9becca4241..0ec5aaf47aa7 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
| @@ -132,11 +132,15 @@ static void adfs_put_super(struct super_block *sb) | |||
| 132 | int i; | 132 | int i; |
| 133 | struct adfs_sb_info *asb = ADFS_SB(sb); | 133 | struct adfs_sb_info *asb = ADFS_SB(sb); |
| 134 | 134 | ||
| 135 | lock_kernel(); | ||
| 136 | |||
| 135 | for (i = 0; i < asb->s_map_size; i++) | 137 | for (i = 0; i < asb->s_map_size; i++) |
| 136 | brelse(asb->s_map[i].dm_bh); | 138 | brelse(asb->s_map[i].dm_bh); |
| 137 | kfree(asb->s_map); | 139 | kfree(asb->s_map); |
| 138 | kfree(asb); | 140 | kfree(asb); |
| 139 | sb->s_fs_info = NULL; | 141 | sb->s_fs_info = NULL; |
| 142 | |||
| 143 | unlock_kernel(); | ||
| 140 | } | 144 | } |
| 141 | 145 | ||
| 142 | static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt) | 146 | static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt) |
diff --git a/fs/affs/super.c b/fs/affs/super.c index 63f5183f263b..d7386462a8e7 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
| @@ -29,6 +29,8 @@ affs_put_super(struct super_block *sb) | |||
| 29 | struct affs_sb_info *sbi = AFFS_SB(sb); | 29 | struct affs_sb_info *sbi = AFFS_SB(sb); |
| 30 | pr_debug("AFFS: put_super()\n"); | 30 | pr_debug("AFFS: put_super()\n"); |
| 31 | 31 | ||
| 32 | lock_kernel(); | ||
| 33 | |||
| 32 | if (!(sb->s_flags & MS_RDONLY)) { | 34 | if (!(sb->s_flags & MS_RDONLY)) { |
| 33 | AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = cpu_to_be32(1); | 35 | AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = cpu_to_be32(1); |
| 34 | secs_to_datestamp(get_seconds(), | 36 | secs_to_datestamp(get_seconds(), |
| @@ -42,7 +44,8 @@ affs_put_super(struct super_block *sb) | |||
| 42 | affs_brelse(sbi->s_root_bh); | 44 | affs_brelse(sbi->s_root_bh); |
| 43 | kfree(sbi); | 45 | kfree(sbi); |
| 44 | sb->s_fs_info = NULL; | 46 | sb->s_fs_info = NULL; |
| 45 | return; | 47 | |
| 48 | unlock_kernel(); | ||
| 46 | } | 49 | } |
| 47 | 50 | ||
| 48 | static void | 51 | static void |
diff --git a/fs/afs/super.c b/fs/afs/super.c index 76828e5f8a39..ad0514d0115f 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
| @@ -440,8 +440,12 @@ static void afs_put_super(struct super_block *sb) | |||
| 440 | 440 | ||
| 441 | _enter(""); | 441 | _enter(""); |
| 442 | 442 | ||
| 443 | lock_kernel(); | ||
| 444 | |||
| 443 | afs_put_volume(as->volume); | 445 | afs_put_volume(as->volume); |
| 444 | 446 | ||
| 447 | unlock_kernel(); | ||
| 448 | |||
| 445 | _leave(""); | 449 | _leave(""); |
| 446 | } | 450 | } |
| 447 | 451 | ||
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 76afd0d6b86c..9367b6297d84 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
| @@ -737,6 +737,8 @@ parse_options(char *options, befs_mount_options * opts) | |||
| 737 | static void | 737 | static void |
| 738 | befs_put_super(struct super_block *sb) | 738 | befs_put_super(struct super_block *sb) |
| 739 | { | 739 | { |
| 740 | lock_kernel(); | ||
| 741 | |||
| 740 | kfree(BEFS_SB(sb)->mount_opts.iocharset); | 742 | kfree(BEFS_SB(sb)->mount_opts.iocharset); |
| 741 | BEFS_SB(sb)->mount_opts.iocharset = NULL; | 743 | BEFS_SB(sb)->mount_opts.iocharset = NULL; |
| 742 | 744 | ||
| @@ -747,7 +749,8 @@ befs_put_super(struct super_block *sb) | |||
| 747 | 749 | ||
| 748 | kfree(sb->s_fs_info); | 750 | kfree(sb->s_fs_info); |
| 749 | sb->s_fs_info = NULL; | 751 | sb->s_fs_info = NULL; |
| 750 | return; | 752 | |
| 753 | unlock_kernel(); | ||
| 751 | } | 754 | } |
| 752 | 755 | ||
| 753 | /* Allocate private field of the superblock, fill it. | 756 | /* Allocate private field of the superblock, fill it. |
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 4cf3d269e271..3a9a1361fdc1 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
| @@ -217,6 +217,8 @@ static void bfs_put_super(struct super_block *s) | |||
| 217 | if (!info) | 217 | if (!info) |
| 218 | return; | 218 | return; |
| 219 | 219 | ||
| 220 | lock_kernel(); | ||
| 221 | |||
| 220 | if (s->s_dirt) | 222 | if (s->s_dirt) |
| 221 | bfs_write_super(s); | 223 | bfs_write_super(s); |
| 222 | 224 | ||
| @@ -225,6 +227,8 @@ static void bfs_put_super(struct super_block *s) | |||
| 225 | kfree(info->si_imap); | 227 | kfree(info->si_imap); |
| 226 | kfree(info); | 228 | kfree(info); |
| 227 | s->s_fs_info = NULL; | 229 | s->s_fs_info = NULL; |
| 230 | |||
| 231 | unlock_kernel(); | ||
| 228 | } | 232 | } |
| 229 | 233 | ||
| 230 | static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) | 234 | static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 0a10a59b6392..0d92114195ab 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -204,6 +204,9 @@ cifs_put_super(struct super_block *sb) | |||
| 204 | cFYI(1, ("Empty cifs superblock info passed to unmount")); | 204 | cFYI(1, ("Empty cifs superblock info passed to unmount")); |
| 205 | return; | 205 | return; |
| 206 | } | 206 | } |
| 207 | |||
| 208 | lock_kernel(); | ||
| 209 | |||
| 207 | rc = cifs_umount(sb, cifs_sb); | 210 | rc = cifs_umount(sb, cifs_sb); |
| 208 | if (rc) | 211 | if (rc) |
| 209 | cERROR(1, ("cifs_umount failed with return code %d", rc)); | 212 | cERROR(1, ("cifs_umount failed with return code %d", rc)); |
| @@ -216,7 +219,8 @@ cifs_put_super(struct super_block *sb) | |||
| 216 | 219 | ||
| 217 | unload_nls(cifs_sb->local_nls); | 220 | unload_nls(cifs_sb->local_nls); |
| 218 | kfree(cifs_sb); | 221 | kfree(cifs_sb); |
| 219 | return; | 222 | |
| 223 | unlock_kernel(); | ||
| 220 | } | 224 | } |
| 221 | 225 | ||
| 222 | static int | 226 | static int |
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index fa4c7e7d15d9..12d649602d3a 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/mount.h> | 27 | #include <linux/mount.h> |
| 28 | #include <linux/key.h> | 28 | #include <linux/key.h> |
| 29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
| 30 | #include <linux/smp_lock.h> | ||
| 30 | #include <linux/file.h> | 31 | #include <linux/file.h> |
| 31 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
| 32 | #include "ecryptfs_kernel.h" | 33 | #include "ecryptfs_kernel.h" |
| @@ -120,9 +121,13 @@ static void ecryptfs_put_super(struct super_block *sb) | |||
| 120 | { | 121 | { |
| 121 | struct ecryptfs_sb_info *sb_info = ecryptfs_superblock_to_private(sb); | 122 | struct ecryptfs_sb_info *sb_info = ecryptfs_superblock_to_private(sb); |
| 122 | 123 | ||
| 124 | lock_kernel(); | ||
| 125 | |||
| 123 | ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat); | 126 | ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat); |
