diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 16:59:34 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:03:43 -0500 |
commit | c74a1cbb3cac348f276fabc381758f5b0b4713b2 (patch) | |
tree | 5b403590e41b5e91fce25c69d50a23b920b3497f /fs/anon_inodes.c | |
parent | f772c4a6a320ec25d94ba951881474eeef1b7f48 (diff) |
pass default dentry_operations to mount_pseudo()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/anon_inodes.c')
-rw-r--r-- | fs/anon_inodes.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 5fd38112a6ca..549a53cc0283 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c | |||
@@ -26,12 +26,6 @@ static struct vfsmount *anon_inode_mnt __read_mostly; | |||
26 | static struct inode *anon_inode_inode; | 26 | static struct inode *anon_inode_inode; |
27 | static const struct file_operations anon_inode_fops; | 27 | static const struct file_operations anon_inode_fops; |
28 | 28 | ||
29 | static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type, | ||
30 | int flags, const char *dev_name, void *data) | ||
31 | { | ||
32 | return mount_pseudo(fs_type, "anon_inode:", NULL, ANON_INODE_FS_MAGIC); | ||
33 | } | ||
34 | |||
35 | /* | 29 | /* |
36 | * anon_inodefs_dname() is called from d_path(). | 30 | * anon_inodefs_dname() is called from d_path(). |
37 | */ | 31 | */ |
@@ -41,14 +35,22 @@ static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen) | |||
41 | dentry->d_name.name); | 35 | dentry->d_name.name); |
42 | } | 36 | } |
43 | 37 | ||
38 | static const struct dentry_operations anon_inodefs_dentry_operations = { | ||
39 | .d_dname = anon_inodefs_dname, | ||
40 | }; | ||
41 | |||
42 | static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type, | ||
43 | int flags, const char *dev_name, void *data) | ||
44 | { | ||
45 | return mount_pseudo(fs_type, "anon_inode:", NULL, | ||
46 | &anon_inodefs_dentry_operations, ANON_INODE_FS_MAGIC); | ||
47 | } | ||
48 | |||
44 | static struct file_system_type anon_inode_fs_type = { | 49 | static struct file_system_type anon_inode_fs_type = { |
45 | .name = "anon_inodefs", | 50 | .name = "anon_inodefs", |
46 | .mount = anon_inodefs_mount, | 51 | .mount = anon_inodefs_mount, |
47 | .kill_sb = kill_anon_super, | 52 | .kill_sb = kill_anon_super, |
48 | }; | 53 | }; |
49 | static const struct dentry_operations anon_inodefs_dentry_operations = { | ||
50 | .d_dname = anon_inodefs_dname, | ||
51 | }; | ||
52 | 54 | ||
53 | /* | 55 | /* |
54 | * nop .set_page_dirty method so that people can use .page_mkwrite on | 56 | * 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, | |||
113 | */ | 115 | */ |
114 | ihold(anon_inode_inode); | 116 | ihold(anon_inode_inode); |
115 | 117 | ||
116 | d_set_d_op(path.dentry, &anon_inodefs_dentry_operations); | ||
117 | d_instantiate(path.dentry, anon_inode_inode); | 118 | d_instantiate(path.dentry, anon_inode_inode); |
118 | 119 | ||
119 | error = -ENFILE; | 120 | error = -ENFILE; |