summaryrefslogtreecommitdiffstats
path: root/fs/cramfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
commit1471f525455788c20b130690e0f104df451aeb43 (patch)
tree3778beba56558beb9a9548ea5b467e9c44ea966f /fs/cramfs
parente80d2c5456d30ebba5b0eb8a9d33e17d815d4d83 (diff)
Merge with Linux 2.3.51.
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/inode.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 89b9719f5..237c7d9aa 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -153,7 +153,6 @@ static struct super_block * cramfs_read_super(struct super_block *sb, void *data
unsigned long root_offset;
struct super_block * retval = NULL;
- lock_super(sb);
set_blocksize(sb->s_dev, PAGE_CACHE_SIZE);
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -198,7 +197,6 @@ static struct super_block * cramfs_read_super(struct super_block *sb, void *data
retval = sb;
out:
- unlock_super(sb);
return retval;
}
@@ -208,20 +206,15 @@ static void cramfs_put_super(struct super_block *sb)
return;
}
-static int cramfs_statfs(struct super_block *sb, struct statfs *buf, int bufsize)
+static int cramfs_statfs(struct super_block *sb, struct statfs *buf)
{
- struct statfs tmp;
-
- /* Unsupported fields set to -1 as per man page. */
- memset(&tmp, 0xff, sizeof(tmp));
-
- tmp.f_type = CRAMFS_MAGIC;
- tmp.f_bsize = PAGE_CACHE_SIZE;
- tmp.f_bfree = 0;
- tmp.f_bavail = 0;
- tmp.f_ffree = 0;
- tmp.f_namelen = 255;
- return copy_to_user(buf, &tmp, bufsize) ? -EFAULT : 0;
+ buf->f_type = CRAMFS_MAGIC;
+ buf->f_bsize = PAGE_CACHE_SIZE;
+ buf->f_bfree = 0;
+ buf->f_bavail = 0;
+ buf->f_ffree = 0;
+ buf->f_namelen = 255;
+ return 0;
}
/*
@@ -372,12 +365,7 @@ static struct super_operations cramfs_ops = {
statfs: cramfs_statfs,
};
-static struct file_system_type cramfs_fs_type = {
- "cramfs",
- FS_REQUIRES_DEV,
- cramfs_read_super,
- NULL
-};
+static DECLARE_FSTYPE_DEV(cramfs_fs_type, "cramfs", cramfs_read_super);
static int __init init_cramfs_fs(void)
{