diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-25 18:47:37 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-15 22:04:17 -0500 |
commit | b26d4cd385fc51e8844e2cdf9ba2051f5bba11a5 (patch) | |
tree | fcfa7a889b494945abf5705562c0384f88924f78 /fs/proc/generic.c | |
parent | 951b4bd553e35a291e6b5732ab0124619e81da05 (diff) |
consolidate simple ->d_delete() instances
Rename simple_delete_dentry() to always_delete_dentry() and export it.
Export simple_dentry_operations, while we are at it, and get rid of
their duplicates
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 737e15615b04..cca93b6fb9a9 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -175,22 +175,6 @@ static const struct inode_operations proc_link_inode_operations = { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * As some entries in /proc are volatile, we want to | ||
179 | * get rid of unused dentries. This could be made | ||
180 | * smarter: we could keep a "volatile" flag in the | ||
181 | * inode to indicate which ones to keep. | ||
182 | */ | ||
183 | static int proc_delete_dentry(const struct dentry * dentry) | ||
184 | { | ||
185 | return 1; | ||
186 | } | ||
187 | |||
188 | static const struct dentry_operations proc_dentry_operations = | ||
189 | { | ||
190 | .d_delete = proc_delete_dentry, | ||
191 | }; | ||
192 | |||
193 | /* | ||
194 | * Don't create negative dentries here, return -ENOENT by hand | 178 | * Don't create negative dentries here, return -ENOENT by hand |
195 | * instead. | 179 | * instead. |
196 | */ | 180 | */ |
@@ -209,7 +193,7 @@ struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir, | |||
209 | inode = proc_get_inode(dir->i_sb, de); | 193 | inode = proc_get_inode(dir->i_sb, de); |
210 | if (!inode) | 194 | if (!inode) |
211 | return ERR_PTR(-ENOMEM); | 195 | return ERR_PTR(-ENOMEM); |
212 | d_set_d_op(dentry, &proc_dentry_operations); | 196 | d_set_d_op(dentry, &simple_dentry_operations); |
213 | d_add(dentry, inode); | 197 | d_add(dentry, inode); |
214 | return NULL; | 198 | return NULL; |
215 | } | 199 | } |