patch-2.3.51 linux/fs/openpromfs/inode.c
Next file: linux/fs/proc/array.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index
- Lines: 72
- Date:
Fri Mar 10 10:48:48 2000
- Orig file:
v2.3.50/linux/fs/openpromfs/inode.c
- Orig date:
Thu Mar 2 14:36:23 2000
diff -u --recursive --new-file v2.3.50/linux/fs/openpromfs/inode.c linux/fs/openpromfs/inode.c
@@ -1,4 +1,4 @@
-/* $Id: inode.c,v 1.6 2000/02/27 08:19:47 davem Exp $
+/* $Id: inode.c,v 1.7 2000/03/10 04:45:50 davem Exp $
* openpromfs.c: /proc/openprom handling routines
*
* Copyright (C) 1996-1999 Jakub Jelinek (jakub@redhat.com)
@@ -982,22 +982,17 @@
static void openprom_put_super(struct super_block *sb)
{
- MOD_DEC_USE_COUNT;
}
-static int openprom_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
+static int openprom_statfs(struct super_block *sb, struct statfs *buf)
{
- struct statfs tmp;
-
- tmp.f_type = OPENPROM_SUPER_MAGIC;
- tmp.f_bsize = PAGE_SIZE/sizeof(long); /* ??? */
- tmp.f_blocks = 0;
- tmp.f_bfree = 0;
- tmp.f_bavail = 0;
- tmp.f_files = 0;
- tmp.f_ffree = 0;
- tmp.f_namelen = NAME_MAX;
- return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
+ buf->f_type = OPENPROM_SUPER_MAGIC;
+ buf->f_bsize = PAGE_SIZE/sizeof(long); /* ??? */
+ buf->f_bfree = 0;
+ buf->f_bavail = 0;
+ buf->f_ffree = 0;
+ buf->f_namelen = NAME_MAX;
+ return 0;
}
static struct super_operations openprom_sops = {
@@ -1011,8 +1006,6 @@
{
struct inode * root_inode;
- MOD_INC_USE_COUNT;
- lock_super(s);
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
s->s_magic = OPENPROM_SUPER_MAGIC;
@@ -1023,24 +1016,15 @@
s->s_root = d_alloc_root(root_inode);
if (!s->s_root)
goto out_no_root;
- unlock_super(s);
return s;
out_no_root:
printk("openprom_read_super: get root inode failed\n");
iput(root_inode);
- s->s_dev = 0;
- unlock_super(s);
- MOD_DEC_USE_COUNT;
return NULL;
}
-static struct file_system_type openprom_fs_type = {
- "openpromfs",
- 0,
- openprom_read_super,
- NULL
-};
+static DECLARE_FSTYPE(openprom_fs_type, "openpromfs", openprom_read_super, 0);
int init_openprom_fs(void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)