summaryrefslogtreecommitdiff
path: root/drivers/hotplug
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-03-14 23:05:58 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-03-14 23:05:58 -0800
commit5e689743c7569951575e7da6ea2c2ea1ef9d08ab (patch)
tree0494bfdcaf4b804e695a0e8348887fdd536d841a /drivers/hotplug
parent4ce937cb16368dc68ccbbef7490666385502cd44 (diff)
[PATCH] fs/libfs.c
Linus, I've taken a bunch of common methods into fs/libfs.c and killed the (duplicated) instances in filesystems. There will be more - ideally I'd like to get a library that would make writing small filesystems trivial.
Diffstat (limited to 'drivers/hotplug')
-rw-r--r--drivers/hotplug/pci_hotplug_core.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/hotplug/pci_hotplug_core.c b/drivers/hotplug/pci_hotplug_core.c
index f7b9b553b919..7accd88b290c 100644
--- a/drivers/hotplug/pci_hotplug_core.c
+++ b/drivers/hotplug/pci_hotplug_core.c
@@ -76,7 +76,6 @@ struct hotplug_slot_core {
};
static struct super_operations pcihpfs_ops;
-static struct file_operations pcihpfs_dir_operations;
static struct file_operations default_file_operations;
static struct inode_operations pcihpfs_dir_inode_operations;
static struct vfsmount *pcihpfs_mount; /* one of the mounts of our fs for reference counting */
@@ -95,13 +94,6 @@ static int pcihpfs_statfs (struct super_block *sb, struct statfs *buf)
return 0;
}
-/* SMP-safe */
-static struct dentry *pcihpfs_lookup (struct inode *dir, struct dentry *dentry)
-{
- d_add(dentry, NULL);
- return NULL;
-}
-
static struct inode *pcihpfs_get_inode (struct super_block *sb, int mode, int dev)
{
struct inode *inode = new_inode(sb);
@@ -123,7 +115,7 @@ static struct inode *pcihpfs_get_inode (struct super_block *sb, int mode, int de
break;
case S_IFDIR:
inode->i_op = &pcihpfs_dir_inode_operations;
- inode->i_fop = &pcihpfs_dir_operations;
+ inode->i_fop = &simple_dir_operations;
break;
}
}
@@ -241,11 +233,6 @@ static int default_open (struct inode *inode, struct file *filp)
return 0;
}
-static struct file_operations pcihpfs_dir_operations = {
- read: generic_read_dir,
- readdir: dcache_readdir,
-};
-
static struct file_operations default_file_operations = {
read: default_read_file,
write: default_write_file,
@@ -302,7 +289,7 @@ static struct file_operations test_file_operations = {
static struct inode_operations pcihpfs_dir_inode_operations = {
create: pcihpfs_create,
- lookup: pcihpfs_lookup,
+ lookup: simple_lookup,
unlink: pcihpfs_unlink,
mkdir: pcihpfs_mkdir,
rmdir: pcihpfs_rmdir,
@@ -310,7 +297,7 @@ static struct inode_operations pcihpfs_dir_inode_operations = {
};
static struct super_operations pcihpfs_ops = {
- statfs: pcihpfs_statfs,
+ statfs: simple_statfs,
put_inode: force_delete,
};