libfs: simple_follow_link()

let "fast" symlinks store the pointer to the body into ->i_link and
use simple_follow_link for ->follow_link()

Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2015-05-02 09:54:06 -04:00
commit 61ba64fc07
3 changed files with 17 additions and 0 deletions

View file

@ -1093,3 +1093,16 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp,
return -EINVAL;
}
EXPORT_SYMBOL(simple_nosetlease);
void *simple_follow_link(struct dentry *dentry, struct nameidata *nd)
{
nd_set_link(nd, d_inode(dentry)->i_link);
return NULL;
}
EXPORT_SYMBOL(simple_follow_link);
const struct inode_operations simple_symlink_inode_operations = {
.follow_link = simple_follow_link,
.readlink = generic_readlink
};
EXPORT_SYMBOL(simple_symlink_inode_operations);