Commit d18f45e6 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (3/4) ->kill_sb() switchover

The rest of nodev filesystems switched.
parent 128b7d66
...@@ -387,6 +387,7 @@ static struct file_system_type capifs_fs_type = { ...@@ -387,6 +387,7 @@ static struct file_system_type capifs_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "capifs", name: "capifs",
get_sb: capifs_get_sb, get_sb: capifs_get_sb,
kill_sb: kill_anon_super,
}; };
void capifs_new_ncci(char type, unsigned int num, kdev_t device) void capifs_new_ncci(char type, unsigned int num, kdev_t device)
......
...@@ -489,12 +489,14 @@ static struct file_system_type usbdevice_fs_type = { ...@@ -489,12 +489,14 @@ static struct file_system_type usbdevice_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "usbdevfs", name: "usbdevfs",
get_sb: usb_get_sb, get_sb: usb_get_sb,
kill_sb: kill_anon_super,
}; };
static struct file_system_type usb_fs_type = { static struct file_system_type usb_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "usbfs", name: "usbfs",
get_sb: usb_get_sb, get_sb: usb_get_sb,
kill_sb: kill_anon_super,
}; };
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
......
...@@ -24,6 +24,7 @@ static struct file_system_type autofs_fs_type = { ...@@ -24,6 +24,7 @@ static struct file_system_type autofs_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "autofs", name: "autofs",
get_sb: autofs_get_sb, get_sb: autofs_get_sb,
kill_sb: kill_anon_super,
}; };
static int __init init_autofs_fs(void) static int __init init_autofs_fs(void)
......
...@@ -24,6 +24,7 @@ static struct file_system_type autofs_fs_type = { ...@@ -24,6 +24,7 @@ static struct file_system_type autofs_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "autofs", name: "autofs",
get_sb: autofs_get_sb, get_sb: autofs_get_sb,
kill_sb: kill_anon_super,
}; };
static int __init init_autofs4_fs(void) static int __init init_autofs4_fs(void)
......
...@@ -260,6 +260,7 @@ static struct super_block *bd_get_sb(struct file_system_type *fs_type, ...@@ -260,6 +260,7 @@ static struct super_block *bd_get_sb(struct file_system_type *fs_type,
static struct file_system_type bd_type = { static struct file_system_type bd_type = {
name: "bdev", name: "bdev",
get_sb: bd_get_sb, get_sb: bd_get_sb,
kill_sb: kill_anon_super,
fs_flags: FS_NOMOUNT, fs_flags: FS_NOMOUNT,
}; };
......
...@@ -316,4 +316,5 @@ struct file_system_type coda_fs_type = { ...@@ -316,4 +316,5 @@ struct file_system_type coda_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "coda", name: "coda",
get_sb: coda_get_sb, get_sb: coda_get_sb,
kill_sb: kill_anon_super,
}; };
...@@ -3323,6 +3323,7 @@ static struct super_block *devfs_get_sb(struct file_system_type *fs_type, ...@@ -3323,6 +3323,7 @@ static struct super_block *devfs_get_sb(struct file_system_type *fs_type,
static struct file_system_type devfs_fs_type = { static struct file_system_type devfs_fs_type = {
name: DEVFS_NAME, name: DEVFS_NAME,
get_sb: devfs_get_sb, get_sb: devfs_get_sb,
kill_sb: kill_anon_super,
}; };
/* File operations for devfsd follow */ /* File operations for devfsd follow */
......
...@@ -189,6 +189,7 @@ static struct file_system_type devpts_fs_type = { ...@@ -189,6 +189,7 @@ static struct file_system_type devpts_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "devpts", name: "devpts",
get_sb: devpts_get_sb, get_sb: devpts_get_sb,
kill_sb: kill_anon_super,
}; };
void devpts_pty_new(int number, kdev_t device) void devpts_pty_new(int number, kdev_t device)
......
...@@ -744,6 +744,7 @@ static struct file_system_type ncp_fs_type = { ...@@ -744,6 +744,7 @@ static struct file_system_type ncp_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "ncpfs", name: "ncpfs",
get_sb: ncp_get_sb, get_sb: ncp_get_sb,
kill_sb: kill_anon_super,
}; };
static int __init init_ncp_fs(void) static int __init init_ncp_fs(void)
......
...@@ -1155,6 +1155,7 @@ static struct file_system_type nfs_fs_type = { ...@@ -1155,6 +1155,7 @@ static struct file_system_type nfs_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "nfs", name: "nfs",
get_sb: nfs_get_sb, get_sb: nfs_get_sb,
kill_sb: kill_anon_super,
fs_flags: FS_ODD_RENAME, fs_flags: FS_ODD_RENAME,
}; };
......
...@@ -1043,6 +1043,7 @@ static struct file_system_type openprom_fs_type = { ...@@ -1043,6 +1043,7 @@ static struct file_system_type openprom_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "openpromfs", name: "openpromfs",
get_sb: openprom_get_sb, get_sb: openprom_get_sb,
kill_sb: kill_anon_super,
}; };
static int __init init_openprom_fs(void) static int __init init_openprom_fs(void)
......
...@@ -635,6 +635,7 @@ static struct super_block *pipefs_get_sb(struct file_system_type *fs_type, ...@@ -635,6 +635,7 @@ static struct super_block *pipefs_get_sb(struct file_system_type *fs_type,
static struct file_system_type pipe_fs_type = { static struct file_system_type pipe_fs_type = {
name: "pipefs", name: "pipefs",
get_sb: pipefs_get_sb, get_sb: pipefs_get_sb,
kill_sb: kill_anon_super,
fs_flags: FS_NOMOUNT, fs_flags: FS_NOMOUNT,
}; };
......
...@@ -33,6 +33,7 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type, ...@@ -33,6 +33,7 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type,
static struct file_system_type proc_fs_type = { static struct file_system_type proc_fs_type = {
name: "proc", name: "proc",
get_sb: proc_get_sb, get_sb: proc_get_sb,
kill_sb: kill_anon_super,
}; };
extern int __init proc_init_inodecache(void); extern int __init proc_init_inodecache(void);
......
...@@ -719,6 +719,7 @@ static struct file_system_type smb_fs_type = { ...@@ -719,6 +719,7 @@ static struct file_system_type smb_fs_type = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "smbfs", name: "smbfs",
get_sb: smb_get_sb, get_sb: smb_get_sb,
kill_sb: kill_anon_super,
}; };
static int __init init_smb_fs(void) static int __init init_smb_fs(void)
......
...@@ -376,8 +376,6 @@ static void insert_super(struct super_block *s, struct file_system_type *type) ...@@ -376,8 +376,6 @@ static void insert_super(struct super_block *s, struct file_system_type *type)
get_filesystem(type); get_filesystem(type);
} }
static void put_anon_dev(kdev_t dev);
/** /**
* remove_super - makes superblock unreachable * remove_super - makes superblock unreachable
* @s: superblock in question * @s: superblock in question
...@@ -437,15 +435,11 @@ static void generic_shutdown_super(struct super_block *sb) ...@@ -437,15 +435,11 @@ static void generic_shutdown_super(struct super_block *sb)
static void shutdown_super(struct super_block *sb) static void shutdown_super(struct super_block *sb)
{ {
struct file_system_type *fs = sb->s_type; struct file_system_type *fs = sb->s_type;
kdev_t dev = sb->s_dev;
struct block_device *bdev = sb->s_bdev; struct block_device *bdev = sb->s_bdev;
generic_shutdown_super(sb); generic_shutdown_super(sb);
if (bdev) { bd_release(bdev);
bd_release(bdev); blkdev_put(bdev, BDEV_FS);
blkdev_put(bdev, BDEV_FS);
} else
put_anon_dev(dev);
} }
void kill_super(struct super_block *sb) void kill_super(struct super_block *sb)
...@@ -615,17 +609,6 @@ enum {Max_anon = 256}; ...@@ -615,17 +609,6 @@ enum {Max_anon = 256};
static unsigned long unnamed_dev_in_use[Max_anon/(8*sizeof(unsigned long))]; static unsigned long unnamed_dev_in_use[Max_anon/(8*sizeof(unsigned long))];
static spinlock_t unnamed_dev_lock = SPIN_LOCK_UNLOCKED;/* protects the above */ static spinlock_t unnamed_dev_lock = SPIN_LOCK_UNLOCKED;/* protects the above */
/**
* put_anon_dev - release anonymous device number.
* @dev: device in question
*/
static void put_anon_dev(kdev_t dev)
{
spin_lock(&unnamed_dev_lock);
clear_bit(minor(dev), unnamed_dev_in_use);
spin_unlock(&unnamed_dev_lock);
}
/** /**
* get_anon_super - allocate a superblock for non-device fs * get_anon_super - allocate a superblock for non-device fs
* @type: filesystem type * @type: filesystem type
......
...@@ -359,6 +359,7 @@ static struct vfsmount *sock_mnt; ...@@ -359,6 +359,7 @@ static struct vfsmount *sock_mnt;
static struct file_system_type sock_fs_type = { static struct file_system_type sock_fs_type = {
name: "sockfs", name: "sockfs",
get_sb: sockfs_get_sb, get_sb: sockfs_get_sb,
kill_sb: kill_anon_super,
fs_flags: FS_NOMOUNT, fs_flags: FS_NOMOUNT,
}; };
static int sockfs_delete_dentry(struct dentry *dentry) static int sockfs_delete_dentry(struct dentry *dentry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment