summaryrefslogtreecommitdiffstats
path: root/fs/cramfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /fs/cramfs
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/inode.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index b9ab3c4c4..89b9719f5 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -23,8 +23,8 @@
#include "cramfs.h"
static struct super_operations cramfs_ops;
-static struct inode_operations cramfs_file_inode_operations;
static struct inode_operations cramfs_dir_inode_operations;
+static struct file_operations cramfs_directory_operations;
static struct address_space_operations cramfs_aops;
/* These two macros may change in future, to provide better st_ino
@@ -52,11 +52,12 @@ static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inod
without -noleaf option. */
insert_inode_hash(inode);
if (S_ISREG(inode->i_mode)) {
- inode->i_op = &cramfs_file_inode_operations;
+ inode->i_fop = &generic_ro_fops;
inode->i_data.a_ops = &cramfs_aops;
- } else if (S_ISDIR(inode->i_mode))
+ } else if (S_ISDIR(inode->i_mode)) {
inode->i_op = &cramfs_dir_inode_operations;
- else if (S_ISLNK(inode->i_mode)) {
+ inode->i_fop = &cramfs_directory_operations;
+ } else if (S_ISLNK(inode->i_mode)) {
inode->i_op = &page_symlink_inode_operations;
inode->i_data.a_ops = &cramfs_aops;
} else {
@@ -352,41 +353,23 @@ static struct address_space_operations cramfs_aops = {
/*
* Our operations:
- *
- * A regular file can be read and mmap'ed.
*/
-static struct file_operations cramfs_file_operations = {
- read: generic_file_read,
- mmap: generic_file_mmap,
-};
/*
* A directory can only readdir
*/
static struct file_operations cramfs_directory_operations = {
+ read: generic_read_dir,
readdir: cramfs_readdir,
};
-static struct inode_operations cramfs_file_inode_operations = {
- &cramfs_file_operations,
-};
-
static struct inode_operations cramfs_dir_inode_operations = {
- &cramfs_directory_operations,
- NULL, /* create */
- cramfs_lookup, /* lookup */
+ lookup: cramfs_lookup,
};
static struct super_operations cramfs_ops = {
- NULL, /* read inode */
- NULL, /* write inode */
- NULL, /* put inode */
- NULL, /* delete inode */
- NULL, /* notify change */
- cramfs_put_super, /* put super */
- NULL, /* write super */
- cramfs_statfs, /* statfs */
- NULL /* remount */
+ put_super: cramfs_put_super,
+ statfs: cramfs_statfs,
};
static struct file_system_type cramfs_fs_type = {