summaryrefslogtreecommitdiffstats
path: root/fs/umsdos
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/umsdos
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/umsdos')
-rw-r--r--fs/umsdos/check.c1
-rw-r--r--fs/umsdos/dir.c35
-rw-r--r--fs/umsdos/inode.c36
-rw-r--r--fs/umsdos/rdir.c21
4 files changed, 42 insertions, 51 deletions
diff --git a/fs/umsdos/check.c b/fs/umsdos/check.c
index 6eebff74a..58755dd2c 100644
--- a/fs/umsdos/check.c
+++ b/fs/umsdos/check.c
@@ -84,7 +84,6 @@ void check_sb (struct super_block *sb, const char c)
/*
* check an inode
*/
-extern struct inode_operations umsdos_rdir_inode_operations;
void check_inode (struct inode *inode)
{
diff --git a/fs/umsdos/dir.c b/fs/umsdos/dir.c
index 366657ae6..be27c54a7 100644
--- a/fs/umsdos/dir.c
+++ b/fs/umsdos/dir.c
@@ -52,17 +52,6 @@ struct dentry_operations umsdos_dentry_operations =
umsdos_dentry_dput /* d_delete(struct dentry *) */
};
-
-/*
- * So grep * doesn't complain in the presence of directories.
- */
-
-int dummy_dir_read (struct file *filp, char *buff, size_t size, loff_t *count)
-{
- return -EISDIR;
-}
-
-
struct UMSDOS_DIR_ONCE {
void *dirbuf;
filldir_t filldir;
@@ -800,23 +789,23 @@ out_noread:
}
-static struct file_operations umsdos_dir_operations =
+struct file_operations umsdos_dir_operations =
{
- read: dummy_dir_read,
+ read: generic_read_dir,
readdir: UMSDOS_readdir,
ioctl: UMSDOS_ioctl_dir,
};
struct inode_operations umsdos_dir_inode_operations =
{
- &umsdos_dir_operations, /* default directory file-ops */
- UMSDOS_create, /* create */
- UMSDOS_lookup, /* lookup */
- UMSDOS_link, /* link */
- UMSDOS_unlink, /* unlink */
- UMSDOS_symlink, /* symlink */
- UMSDOS_mkdir, /* mkdir */
- UMSDOS_rmdir, /* rmdir */
- UMSDOS_mknod, /* mknod */
- UMSDOS_rename, /* rename */
+ create: UMSDOS_create,
+ lookup: UMSDOS_lookup,
+ link: UMSDOS_link,
+ unlink: UMSDOS_unlink,
+ symlink: UMSDOS_symlink,
+ mkdir: UMSDOS_mkdir,
+ rmdir: UMSDOS_rmdir,
+ mknod: UMSDOS_mknod,
+ rename: UMSDOS_rename,
+ setattr: UMSDOS_notify_change,
};
diff --git a/fs/umsdos/inode.c b/fs/umsdos/inode.c
index 95d6528f3..7908144d7 100644
--- a/fs/umsdos/inode.c
+++ b/fs/umsdos/inode.c
@@ -20,8 +20,6 @@
#include <linux/list.h>
extern struct dentry_operations umsdos_dentry_operations;
-extern struct inode_operations umsdos_rdir_inode_operations;
-
struct dentry *saved_root = NULL; /* Original root if changed */
struct inode *pseudo_root = NULL; /* Useful to simulate the pseudo DOS */
@@ -42,7 +40,7 @@ void fill_new_filp (struct file *filp, struct dentry *dentry)
filp->f_reada = 1;
filp->f_flags = O_RDWR;
filp->f_dentry = dentry;
- filp->f_op = dentry->d_inode->i_op->default_file_ops;
+ filp->f_op = dentry->d_inode->i_fop;
}
@@ -100,10 +98,12 @@ void umsdos_setup_dir(struct dentry *dir)
inode->u.umsdos_i.dir_info.pid = 0;
inode->i_op = &umsdos_rdir_inode_operations;
+ inode->i_fop = &umsdos_rdir_operations;
if (umsdos_have_emd(dir)) {
Printk((KERN_DEBUG "umsdos_setup_dir: %s/%s using EMD\n",
dir->d_parent->d_name.name, dir->d_name.name));
inode->i_op = &umsdos_dir_inode_operations;
+ inode->i_fop = &umsdos_dir_operations;
}
}
@@ -126,7 +126,16 @@ void umsdos_set_dirinfo_new (struct dentry *dentry, off_t f_pos)
return;
}
+static struct inode_operations umsdos_file_inode_operations = {
+ truncate: fat_truncate,
+ setattr: UMSDOS_notify_change,
+};
+static struct inode_operations umsdos_symlink_inode_operations = {
+ readlink: page_readlink,
+ follow_link: page_follow_link,
+ setattr: UMSDOS_notify_change,
+};
/*
* Connect the proper tables in the inode and add some info.
@@ -150,13 +159,14 @@ PRINTK (("umsdos_patch_inode: call umsdos_set_dirinfo_new(%p,%lu)\n",
dentry, f_pos));
umsdos_set_dirinfo_new(dentry, f_pos);
+ inode->i_op = &umsdos_file_inode_operations;
if (S_ISREG (inode->i_mode)) {
- /* All set */
+ /* address_space operations already set */
} else if (S_ISDIR (inode->i_mode)) {
umsdos_setup_dir(dentry);
} else if (S_ISLNK (inode->i_mode)) {
/* address_space operations already set */
- inode->i_op = &page_symlink_inode_operations;
+ inode->i_op = &umsdos_symlink_inode_operations;
} else
init_special_inode(inode, inode->i_mode,
kdev_t_to_nr(inode->i_rdev));
@@ -307,16 +317,12 @@ void UMSDOS_write_inode (struct inode *inode)
static struct super_operations umsdos_sops =
{
- NULL, /* read_inode */
- UMSDOS_write_inode, /* write_inode */
- UMSDOS_put_inode, /* put_inode */
- fat_delete_inode, /* delete_inode */
- UMSDOS_notify_change, /* notify_change */
- UMSDOS_put_super, /* put_super */
- NULL, /* write_super */
- fat_statfs, /* statfs */
- NULL, /* remount_fs */
- fat_clear_inode /* clear_inode */
+ write_inode: UMSDOS_write_inode,
+ put_inode: UMSDOS_put_inode,
+ delete_inode: fat_delete_inode,
+ put_super: UMSDOS_put_super,
+ statfs: fat_statfs,
+ clear_inode: fat_clear_inode,
};
/*
diff --git a/fs/umsdos/rdir.c b/fs/umsdos/rdir.c
index a466a9396..d05dfed73 100644
--- a/fs/umsdos/rdir.c
+++ b/fs/umsdos/rdir.c
@@ -218,23 +218,20 @@ out:
* have a "r" prefix (r for real) such as UMSDOS_rlookup, to differentiate
* from the one with full UMSDOS semantics.
*/
-static struct file_operations umsdos_rdir_operations =
+struct file_operations umsdos_rdir_operations =
{
- read: dummy_dir_read,
+ read: generic_read_dir,
readdir: UMSDOS_rreaddir,
ioctl: UMSDOS_ioctl_dir,
};
struct inode_operations umsdos_rdir_inode_operations =
{
- &umsdos_rdir_operations, /* default directory file-ops */
- msdos_create, /* create */
- UMSDOS_rlookup, /* lookup */
- NULL, /* link */
- msdos_unlink, /* unlink */
- NULL, /* symlink */
- msdos_mkdir, /* mkdir */
- UMSDOS_rrmdir, /* rmdir */
- NULL, /* mknod */
- msdos_rename, /* rename */
+ create: msdos_create,
+ lookup: UMSDOS_rlookup,
+ unlink: msdos_unlink,
+ mkdir: msdos_mkdir,
+ rmdir: UMSDOS_rrmdir,
+ rename: msdos_rename,
+ setattr: UMSDOS_notify_change,
};