patch-2.3.43 linux/fs/romfs/inode.c
Next file: linux/fs/select.c
Previous file: linux/fs/qnx4/symlinks.c
Back to the patch index
Back to the overall index
- Lines: 101
- Date:
Thu Feb 10 12:16:59 2000
- Orig file:
v2.3.42/linux/fs/romfs/inode.c
- Orig date:
Fri Jan 7 19:13:22 2000
diff -u --recursive --new-file v2.3.42/linux/fs/romfs/inode.c linux/fs/romfs/inode.c
@@ -446,47 +446,21 @@
/* Mapping from our types to the kernel */
+static struct address_space_operations romfs_aops = {
+ readpage: romfs_readpage
+};
+
static struct file_operations romfs_file_operations = {
- NULL, /* lseek - default */
- generic_file_read, /* read */
- NULL, /* write - bad */
- NULL, /* readdir */
- NULL, /* poll - default */
- NULL, /* ioctl */
- generic_file_mmap, /* mmap */
- NULL, /* open */
- NULL, /* flush */
- NULL, /* release */
- NULL, /* fsync */
- NULL, /* fasync */
+ read: generic_file_read,
+ mmap: generic_file_mmap,
};
static struct inode_operations romfs_file_inode_operations = {
&romfs_file_operations,
- NULL, /* create */
- NULL, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- NULL, /* readlink */
- NULL, /* follow_link */
- NULL, /* get_block -- not really */
- romfs_readpage, /* readpage */
- NULL, /* writepage */
- NULL, /* truncate */
- NULL, /* permission */
- NULL /* revalidate */
};
static struct file_operations romfs_dir_operations = {
- NULL, /* lseek - default */
- NULL, /* read */
- NULL, /* write - bad */
- romfs_readdir, /* readdir */
+ readdir: romfs_readdir,
};
/* Merged dir/symlink op table. readdir/lookup/readlink/follow_link
@@ -497,27 +471,6 @@
&romfs_dir_operations,
NULL, /* create */
romfs_lookup, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- NULL, /* readlink */
- NULL, /* follow_link */
- NULL, /* get_block */
- NULL, /* readpage */
- NULL, /* writepage */
- NULL, /* truncate */
- NULL, /* permission */
- NULL /* revalidate */
-};
-
-static struct inode_operations romfs_link_inode_operations = {
- readlink: page_readlink,
- follow_link: page_follow_link,
- readpage: romfs_readpage
};
static mode_t romfs_modemap[] =
@@ -531,7 +484,7 @@
NULL, /* hardlink, handled elsewhere */
&romfs_dir_inode_operations,
&romfs_file_inode_operations,
- &romfs_link_inode_operations,
+ &page_symlink_inode_operations,
NULL, /* device/fifo/socket nodes, */
NULL, /* set by init_special_inode */
NULL,
@@ -587,6 +540,8 @@
i->i_mode = ino;
if (S_ISDIR(ino))
i->i_size = i->u.romfs_i.i_metasize;
+ else
+ i->i_data.a_ops = &romfs_aops;
} else {
/* depending on MBZ for sock/fifos */
nextfh = ntohl(ri.spec);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)