summaryrefslogtreecommitdiffstats
path: root/fs/adfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/adfs')
-rw-r--r--fs/adfs/adfs.h2
-rw-r--r--fs/adfs/dir.c15
-rw-r--r--fs/adfs/file.c5
-rw-r--r--fs/adfs/inode.c17
-rw-r--r--fs/adfs/super.c15
5 files changed, 17 insertions, 37 deletions
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index abda2e2d0..9e1a59ed2 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -96,6 +96,7 @@ extern struct dentry *adfs_lookup(struct inode *dir, struct dentry *dentry);
/* dir_*.c */
extern struct inode_operations adfs_dir_inode_operations;
+extern struct file_operations adfs_dir_operations;
extern struct adfs_dir_ops adfs_f_dir_ops;
extern struct adfs_dir_ops adfs_fplus_dir_ops;
@@ -103,6 +104,7 @@ extern int adfs_dir_update(struct super_block *sb, struct object_info *obj);
/* file.c */
extern struct inode_operations adfs_file_inode_operations;
+extern struct file_operations adfs_file_operations;
extern inline __u32 signed_asl(__u32 val, signed int shift)
{
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index 140e28598..a7da5eeda 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -188,14 +188,8 @@ out:
return ret;
}
-static ssize_t
-adfs_dir_no_read(struct file *filp, char *buf, size_t siz, loff_t *ppos)
-{
- return -EISDIR;
-}
-
-static struct file_operations adfs_dir_operations = {
- read: adfs_dir_no_read,
+struct file_operations adfs_dir_operations = {
+ read: generic_read_dir,
readdir: adfs_readdir,
fsync: file_fsync,
};
@@ -296,7 +290,6 @@ struct dentry *adfs_lookup(struct inode *dir, struct dentry *dentry)
* directories can handle most operations...
*/
struct inode_operations adfs_dir_inode_operations = {
- &adfs_dir_operations, /* default directory file-ops */
- NULL, /* create */
- adfs_lookup, /* lookup */
+ lookup: adfs_lookup,
+ setattr: adfs_notify_change,
};
diff --git a/fs/adfs/file.c b/fs/adfs/file.c
index 0d5f4346e..0cd28ca47 100644
--- a/fs/adfs/file.c
+++ b/fs/adfs/file.c
@@ -33,7 +33,7 @@
* We have mostly NULLs here: the current defaults are OK for
* the adfs filesystem.
*/
-static struct file_operations adfs_file_operations = {
+struct file_operations adfs_file_operations = {
read: generic_file_read,
mmap: generic_file_mmap,
fsync: file_fsync,
@@ -43,8 +43,9 @@ static struct file_operations adfs_file_operations = {
};
struct inode_operations adfs_file_inode_operations = {
- &adfs_file_operations, /* default file operations */
+ setattr: adfs_notify_change,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+ &adfs_file_operations, /* default file operations */
readpage: generic_readpage,
bmap: adfs_bmap,
#endif
diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c
index 7a759c050..6eb08c857 100644
--- a/fs/adfs/inode.c
+++ b/fs/adfs/inode.c
@@ -283,10 +283,12 @@ adfs_iget(struct super_block *sb, struct object_info *obj)
inode->i_atime =
inode->i_ctime = adfs_adfs2unix_time(inode);
- if (S_ISDIR(inode->i_mode))
+ if (S_ISDIR(inode->i_mode)) {
inode->i_op = &adfs_dir_inode_operations;
- else if (S_ISREG(inode->i_mode)) {
+ inode->i_fop = &adfs_dir_operations;
+ } else if (S_ISREG(inode->i_mode)) {
inode->i_op = &adfs_file_inode_operations;
+ inode->i_fop = &adfs_file_operations;
inode->i_mapping->a_ops = &adfs_aops;
inode->u.adfs_i.mmu_private = inode->i_size;
}
@@ -298,17 +300,6 @@ out:
}
/*
- * This is no longer a valid way to obtain the metadata associated with the
- * inode number on this filesystem. This means that this filesystem cannot
- * be shared via NFS.
- */
-void adfs_read_inode(struct inode *inode)
-{
- adfs_error(inode->i_sb, "unsupported method of reading inode");
- make_bad_inode(inode);
-}
-
-/*
* Validate and convert a changed access mode/time to their ADFS equivalents.
* adfs_write_inode will actually write the information back to the directory
* later.
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 7b7eb2d0e..7c80a6958 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -231,17 +231,10 @@ static int adfs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
}
static struct super_operations adfs_sops = {
- adfs_read_inode, /* read_inode */
- adfs_write_inode, /* write_inode */
- NULL, /* put_inode */
- NULL, /* delete_inode */
- adfs_notify_change, /* notify_change */
- adfs_put_super, /* put_super */
- NULL, /* write_super */
- adfs_statfs, /* statfs */
- adfs_remount, /* remount_fs */
- NULL, /* clear_inode */
- NULL /* umount_begin */
+ write_inode: adfs_write_inode,
+ put_super: adfs_put_super,
+ statfs: adfs_statfs,
+ remount_fs: adfs_remount,
};
static struct adfs_discmap *adfs_read_map(struct super_block *sb, struct adfs_discrecord *dr)