summaryrefslogtreecommitdiffstats
path: root/fs/autofs4
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/autofs4
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/autofs_i.h2
-rw-r--r--fs/autofs4/inode.c7
-rw-r--r--fs/autofs4/root.c38
3 files changed, 25 insertions, 22 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 102f7213e..b55afd6c4 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -155,6 +155,8 @@ int autofs4_expire_multi(struct super_block *, struct autofs_sb_info *, int *);
extern struct inode_operations autofs4_symlink_inode_operations;
extern struct inode_operations autofs4_dir_inode_operations;
extern struct inode_operations autofs4_root_inode_operations;
+extern struct file_operations autofs4_dir_operations;
+extern struct file_operations autofs4_root_operations;
/* Initializing function */
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 9c8bd133f..40d149272 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -410,10 +410,13 @@ static void autofs4_read_inode(struct inode *inode)
if (S_ISDIR(inf->mode)) {
inode->i_nlink = 2;
- if (inode->i_ino == AUTOFS_ROOT_INO)
+ if (inode->i_ino == AUTOFS_ROOT_INO) {
inode->i_op = &autofs4_root_inode_operations;
- else
+ inode->i_fop = &autofs4_root_operations;
+ } else {
inode->i_op = &autofs4_dir_inode_operations;
+ inode->i_fop = &autofs4_dir_operations;
+ }
} else if (S_ISLNK(inf->mode)) {
inode->i_op = &autofs4_symlink_inode_operations;
}
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index b7e4bcd0c..05045d408 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -25,33 +25,31 @@ static int autofs4_dir_mkdir(struct inode *,struct dentry *,int);
static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long);
static struct dentry *autofs4_root_lookup(struct inode *,struct dentry *);
-static struct file_operations autofs4_root_operations = {
- readdir: autofs4_dir_readdir, /* readdir */
- ioctl: autofs4_root_ioctl, /* ioctl */
+struct file_operations autofs4_root_operations = {
+ read: generic_read_dir,
+ readdir: autofs4_dir_readdir,
+ ioctl: autofs4_root_ioctl,
};
-struct inode_operations autofs4_root_inode_operations = {
- &autofs4_root_operations, /* file operations */
-
- lookup: autofs4_root_lookup, /* lookup */
- unlink: autofs4_dir_unlink, /* unlink */
- symlink: autofs4_dir_symlink, /* symlink */
- mkdir: autofs4_dir_mkdir, /* mkdir */
- rmdir: autofs4_dir_rmdir, /* rmdir */
+struct file_operations autofs4_dir_operations = {
+ read: generic_read_dir,
+ readdir: autofs4_dir_readdir,
};
-static struct file_operations autofs4_dir_operations = {
- readdir: autofs4_dir_readdir, /* readdir */
+struct inode_operations autofs4_root_inode_operations = {
+ lookup: autofs4_root_lookup,
+ unlink: autofs4_dir_unlink,
+ symlink: autofs4_dir_symlink,
+ mkdir: autofs4_dir_mkdir,
+ rmdir: autofs4_dir_rmdir,
};
struct inode_operations autofs4_dir_inode_operations = {
- &autofs4_dir_operations, /* file operations */
-
- lookup: autofs4_dir_lookup, /* lookup */
- unlink: autofs4_dir_unlink, /* unlink */
- symlink: autofs4_dir_symlink, /* symlink */
- mkdir: autofs4_dir_mkdir, /* mkdir */
- rmdir: autofs4_dir_rmdir, /* rmdir */
+ lookup: autofs4_dir_lookup,
+ unlink: autofs4_dir_unlink,
+ symlink: autofs4_dir_symlink,
+ mkdir: autofs4_dir_mkdir,
+ rmdir: autofs4_dir_rmdir,
};
static inline struct dentry *nth_child(struct dentry *dir, int nr)