summaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2011-01-14 18:46:24 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-15 20:07:42 -0500
commit6651149371b842715906311b4631b8489cebf7e8 (patch)
tree4ad6941a353515edaada23426ec3b44724f40ca3 /fs/autofs4/inode.c
parent71e469db242c2eeb00faf9caf7d9e00150c00a6e (diff)
downloadlinux-6651149371b842715906311b4631b8489cebf7e8.tar.gz
linux-6651149371b842715906311b4631b8489cebf7e8.tar.bz2
linux-6651149371b842715906311b4631b8489cebf7e8.zip
autofs4: Clean up autofs4_free_ino()
When this function is called the local reference count does't need to be updated since the dentry is going away and dput definitely must not be called here. Also the autofs info struct field inode isn't used so remove it. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r--fs/autofs4/inode.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 427c35746340..3ecd2e2bcdbd 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -45,7 +45,6 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
if (!reinit) {
ino->flags = 0;
- ino->inode = NULL;
ino->dentry = NULL;
ino->size = 0;
INIT_LIST_HEAD(&ino->active);
@@ -76,19 +75,8 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
void autofs4_free_ino(struct autofs_info *ino)
{
- struct autofs_info *p_ino;
-
if (ino->dentry) {
ino->dentry->d_fsdata = NULL;
- if (ino->dentry->d_inode) {
- struct dentry *parent = ino->dentry->d_parent;
- if (atomic_dec_and_test(&ino->count)) {
- p_ino = autofs4_dentry_ino(parent);
- if (p_ino && parent != ino->dentry)
- atomic_dec(&p_ino->count);
- }
- dput(ino->dentry);
- }
ino->dentry = NULL;
}
if (ino->free)
@@ -390,7 +378,6 @@ struct inode *autofs4_get_inode(struct super_block *sb,
if (inode == NULL)
return NULL;
- inf->inode = inode;
inode->i_mode = inf->mode;
if (sb->s_root) {
inode->i_uid = sb->s_root->d_inode->i_uid;