summaryrefslogtreecommitdiffstats
path: root/fs/udf
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/udf
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/dir.c30
-rw-r--r--fs/udf/file.c3
-rw-r--r--fs/udf/ialloc.c1
-rw-r--r--fs/udf/inode.c2
-rw-r--r--fs/udf/namei.c36
-rw-r--r--fs/udf/super.c24
-rw-r--r--fs/udf/udfdecl.h11
7 files changed, 39 insertions, 68 deletions
diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index 963d20344..c31ff527a 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -49,39 +49,13 @@ static int do_udf_readdir(struct inode *, struct file *, filldir_t, void *);
/* readdir and lookup functions */
-static struct file_operations udf_dir_operations = {
+struct file_operations udf_dir_operations = {
+ read: generic_read_dir,
readdir: udf_readdir,
ioctl: udf_ioctl,
fsync: udf_sync_file,
};
-struct inode_operations udf_dir_inode_operations = {
- &udf_dir_operations,
-#if CONFIG_UDF_RW == 1
- udf_create, /* create */
-#else
- NULL, /* create */
-#endif
- udf_lookup, /* lookup */
-#if CONFIG_UDF_RW == 1
- udf_link, /* link */
- udf_unlink, /* unlink */
- udf_symlink, /* symlink */
- udf_mkdir, /* mkdir */
- udf_rmdir, /* rmdir */
- udf_mknod, /* mknod */
- udf_rename, /* rename */
-#else
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
-#endif
-};
-
/*
* udf_readdir
*
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 546ac95b8..cea86257b 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -349,7 +349,7 @@ static int udf_open_file(struct inode * inode, struct file * filp)
return 0;
}
-static struct file_operations udf_file_operations = {
+struct file_operations udf_file_operations = {
llseek: udf_file_llseek,
read: generic_file_read,
write: udf_file_write,
@@ -361,7 +361,6 @@ static struct file_operations udf_file_operations = {
};
struct inode_operations udf_file_inode_operations = {
- &udf_file_operations,
#if CONFIG_UDF_RW == 1
truncate: udf_truncate,
#endif
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index 8badac9d9..1f3300b7f 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -151,7 +151,6 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
UDF_I_ALLOCTYPE(inode) = ICB_FLAG_AD_IN_ICB;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
UDF_I_UMTIME(inode) = UDF_I_UATIME(inode) = UDF_I_UCTIME(inode) = CURRENT_UTIME;
- inode->i_op = NULL;
insert_inode_hash(inode);
mark_inode_dirty(inode);
unlock_super(sb);
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 752a00339..335f54c75 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1077,6 +1077,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
case FILE_TYPE_DIRECTORY:
{
inode->i_op = &udf_dir_inode_operations;
+ inode->i_fop = &udf_dir_operations;
inode->i_mode |= S_IFDIR;
inode->i_nlink ++;
break;
@@ -1089,6 +1090,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
else
inode->i_data.a_ops = &udf_aops;
inode->i_op = &udf_file_inode_operations;
+ inode->i_fop = &udf_file_operations;
inode->i_mode |= S_IFREG;
break;
}
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index aff491ef5..f31bff3fc 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -289,7 +289,7 @@ udf_find_entry(struct inode *dir, struct dentry *dentry,
* Written, tested, and released.
*/
-struct dentry *
+static struct dentry *
udf_lookup(struct inode *dir, struct dentry *dentry)
{
struct inode *inode = NULL;
@@ -631,7 +631,7 @@ static int udf_delete_entry(struct FileIdentDesc *fi,
return udf_write_fi(cfi, fi, fibh, NULL, NULL);
}
-int udf_create(struct inode *dir, struct dentry *dentry, int mode)
+static int udf_create(struct inode *dir, struct dentry *dentry, int mode)
{
struct udf_fileident_bh fibh;
struct inode *inode;
@@ -644,6 +644,7 @@ int udf_create(struct inode *dir, struct dentry *dentry, int mode)
inode->i_data.a_ops = &udf_adinicb_aops;
inode->i_op = &udf_file_inode_operations;
+ inode->i_fop = &udf_file_operations;
inode->i_mode = mode;
mark_inode_dirty(inode);
@@ -672,7 +673,7 @@ int udf_create(struct inode *dir, struct dentry *dentry, int mode)
return 0;
}
-int udf_mknod(struct inode * dir, struct dentry * dentry, int mode, int rdev)
+static int udf_mknod(struct inode * dir, struct dentry * dentry, int mode, int rdev)
{
struct inode * inode;
struct udf_fileident_bh fibh;
@@ -686,8 +687,6 @@ int udf_mknod(struct inode * dir, struct dentry * dentry, int mode, int rdev)
inode->i_uid = current->fsuid;
init_special_inode(inode, mode, rdev);
- inode->i_mode = mode;
- inode->i_op = NULL;
if (!(fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err)))
{
udf_debug("udf_add_entry failure!\n");
@@ -717,7 +716,7 @@ out:
return err;
}
-int udf_mkdir(struct inode * dir, struct dentry * dentry, int mode)
+static int udf_mkdir(struct inode * dir, struct dentry * dentry, int mode)
{
struct inode * inode;
struct udf_fileident_bh fibh;
@@ -736,6 +735,7 @@ int udf_mkdir(struct inode * dir, struct dentry * dentry, int mode)
goto out;
inode->i_op = &udf_dir_inode_operations;
+ inode->i_fop = &udf_dir_operations;
inode->i_size = (sizeof(struct FileIdentDesc) + 3) & ~3;
UDF_I_LENALLOC(inode) = inode->i_size;
loc = UDF_I_LOCATION(inode).logicalBlockNum;
@@ -860,7 +860,7 @@ static int empty_dir(struct inode *dir)
return 1;
}
-int udf_rmdir(struct inode * dir, struct dentry * dentry)
+static int udf_rmdir(struct inode * dir, struct dentry * dentry)
{
int retval;
struct inode * inode;
@@ -906,7 +906,7 @@ out:
return retval;
}
-int udf_unlink(struct inode * dir, struct dentry * dentry)
+static int udf_unlink(struct inode * dir, struct dentry * dentry)
{
int retval;
struct inode * inode;
@@ -955,7 +955,7 @@ out:
return retval;
}
-int udf_symlink(struct inode * dir, struct dentry * dentry, const char * symname)
+static int udf_symlink(struct inode * dir, struct dentry * dentry, const char * symname)
{
struct inode * inode;
struct PathComponent *pc;
@@ -1075,7 +1075,7 @@ out:
return err;
}
-int udf_link(struct dentry * old_dentry, struct inode * dir,
+static int udf_link(struct dentry * old_dentry, struct inode * dir,
struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;
@@ -1127,7 +1127,7 @@ int udf_link(struct dentry * old_dentry, struct inode * dir,
/* Anybody can rename anything with this: the permission checks are left to the
* higher-level routines.
*/
-int udf_rename (struct inode * old_dir, struct dentry * old_dentry,
+static int udf_rename (struct inode * old_dir, struct dentry * old_dentry,
struct inode * new_dir, struct dentry * new_dentry)
{
struct inode * old_inode, * new_inode;
@@ -1270,3 +1270,17 @@ end_rename:
}
return retval;
}
+
+struct inode_operations udf_dir_inode_operations = {
+ lookup: udf_lookup,
+#if CONFIG_UDF_RW == 1
+ create: udf_create,
+ link: udf_link,
+ unlink: udf_unlink,
+ symlink: udf_symlink,
+ mkdir: udf_mkdir,
+ rmdir: udf_rmdir,
+ mknod: udf_mknod,
+ rename: udf_rename,
+#endif
+};
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 272b9eacb..ed98bf802 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -105,25 +105,15 @@ static struct file_system_type udf_fstype = {
/* Superblock operations */
static struct super_operations udf_sb_ops =
{
- udf_read_inode, /* read_inode */
+ read_inode: udf_read_inode,
+ put_inode: udf_put_inode,
+ put_super: udf_put_super,
+ statfs: udf_statfs,
+ remount_fs: udf_remount_fs,
#if CONFIG_UDF_RW == 1
- udf_write_inode, /* write_inode */
-#else
- NULL, /* write_inode */
+ write_inode: udf_write_inode,
+ delete_inode: udf_delete_inode,
#endif
- udf_put_inode, /* put_inode */
-#if CONFIG_UDF_RW == 1
- udf_delete_inode, /* delete_inode */
-#else
- NULL, /* delete_inode */
-#endif
- NULL, /* notify_change */
- udf_put_super, /* put_super */
- NULL, /* write_super */
- udf_statfs, /* statfs */
- udf_remount_fs, /* remount_fs */
- NULL, /* clear_inode */
- NULL, /* umount_begin */
};
struct udf_options
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 39418f730..74a84f36c 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -63,6 +63,8 @@ struct super_block;
extern struct inode_operations udf_dir_inode_operations;
extern struct inode_operations udf_file_inode_operations;
+extern struct file_operations udf_dir_operations;
+extern struct file_operations udf_file_operations;
extern struct address_space_operations udf_adinicb_aops;
extern struct address_space_operations udf_symlink_aops;
@@ -118,15 +120,6 @@ extern void udf_warning(struct super_block *, const char *, const char *, ...);
/* namei.c */
extern int udf_write_fi(struct FileIdentDesc *, struct FileIdentDesc *, struct udf_fileident_bh *, Uint8 *, Uint8 *);
-extern struct dentry * udf_lookup(struct inode *, struct dentry *);
-extern int udf_create(struct inode *, struct dentry *, int);
-extern int udf_mknod(struct inode *, struct dentry *, int, int);
-extern int udf_mkdir(struct inode *, struct dentry *, int);
-extern int udf_rmdir(struct inode *, struct dentry *);
-extern int udf_unlink(struct inode *, struct dentry *);
-extern int udf_symlink(struct inode *, struct dentry *, const char *);
-extern int udf_link(struct dentry *, struct inode *, struct dentry *);
-extern int udf_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
/* file.c */
extern int udf_ioctl(struct inode *, struct file *, unsigned int, unsigned long);