|
@@ -26,12 +26,6 @@ static struct vfsmount *anon_inode_mnt __read_mostly;
|
|
static struct inode *anon_inode_inode;
|
|
static struct inode *anon_inode_inode;
|
|
static const struct file_operations anon_inode_fops;
|
|
static const struct file_operations anon_inode_fops;
|
|
|
|
|
|
-static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type,
|
|
|
|
- int flags, const char *dev_name, void *data)
|
|
|
|
-{
|
|
|
|
- return mount_pseudo(fs_type, "anon_inode:", NULL, ANON_INODE_FS_MAGIC);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* anon_inodefs_dname() is called from d_path().
|
|
* anon_inodefs_dname() is called from d_path().
|
|
*/
|
|
*/
|
|
@@ -41,14 +35,22 @@ static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
|
|
dentry->d_name.name);
|
|
dentry->d_name.name);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static const struct dentry_operations anon_inodefs_dentry_operations = {
|
|
|
|
+ .d_dname = anon_inodefs_dname,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type,
|
|
|
|
+ int flags, const char *dev_name, void *data)
|
|
|
|
+{
|
|
|
|
+ return mount_pseudo(fs_type, "anon_inode:", NULL,
|
|
|
|
+ &anon_inodefs_dentry_operations, ANON_INODE_FS_MAGIC);
|
|
|
|
+}
|
|
|
|
+
|
|
static struct file_system_type anon_inode_fs_type = {
|
|
static struct file_system_type anon_inode_fs_type = {
|
|
.name = "anon_inodefs",
|
|
.name = "anon_inodefs",
|
|
.mount = anon_inodefs_mount,
|
|
.mount = anon_inodefs_mount,
|
|
.kill_sb = kill_anon_super,
|
|
.kill_sb = kill_anon_super,
|
|
};
|
|
};
|
|
-static const struct dentry_operations anon_inodefs_dentry_operations = {
|
|
|
|
- .d_dname = anon_inodefs_dname,
|
|
|
|
-};
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* nop .set_page_dirty method so that people can use .page_mkwrite on
|
|
* nop .set_page_dirty method so that people can use .page_mkwrite on
|
|
@@ -113,7 +115,6 @@ struct file *anon_inode_getfile(const char *name,
|
|
*/
|
|
*/
|
|
ihold(anon_inode_inode);
|
|
ihold(anon_inode_inode);
|
|
|
|
|
|
- d_set_d_op(path.dentry, &anon_inodefs_dentry_operations);
|
|
|
|
d_instantiate(path.dentry, anon_inode_inode);
|
|
d_instantiate(path.dentry, anon_inode_inode);
|
|
|
|
|
|
error = -ENFILE;
|
|
error = -ENFILE;
|