autofs4: keep symlink body in inode->i_private

gets rid of all ->free()/->u.symlink machinery in autofs; we simply
keep symlink bodies in inode->i_private and free them in ->evict_inode().

Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2011-01-17 00:47:38 -05:00
parent c0bcc9d552
commit 292c5ee802
4 changed files with 9 additions and 28 deletions

View File

@ -561,6 +561,7 @@ static int autofs4_dir_symlink(struct inode *dir,
kfree(ino);
return -ENOMEM;
}
inode->i_private = cp;
d_add(dentry, inode);
dentry->d_fsdata = ino;
@ -570,7 +571,6 @@ static int autofs4_dir_symlink(struct inode *dir,
if (p_ino && dentry->d_parent != dentry)
atomic_inc(&p_ino->count);
ino->u.symlink = cp;
dir->i_mtime = CURRENT_TIME;
return 0;