mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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:
parent
a7a67e8a08
commit
61ba64fc07
3 changed files with 17 additions and 0 deletions
13
fs/libfs.c
13
fs/libfs.c
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue