Skip to content

Commit 6ee9706

Browse files
ebiggersAl Viro
authored andcommitted
libfs: document simple_get_link()
Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 1a6a316 commit 6ee9706

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

fs/libfs.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,20 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp,
11671167
}
11681168
EXPORT_SYMBOL(simple_nosetlease);
11691169

1170+
/**
1171+
* simple_get_link - generic helper to get the target of "fast" symlinks
1172+
* @dentry: not used here
1173+
* @inode: the symlink inode
1174+
* @done: not used here
1175+
*
1176+
* Generic helper for filesystems to use for symlink inodes where a pointer to
1177+
* the symlink target is stored in ->i_link. NOTE: this isn't normally called,
1178+
* since as an optimization the path lookup code uses any non-NULL ->i_link
1179+
* directly, without calling ->get_link(). But ->get_link() still must be set,
1180+
* to mark the inode_operations as being for a symlink.
1181+
*
1182+
* Return: the symlink target
1183+
*/
11701184
const char *simple_get_link(struct dentry *dentry, struct inode *inode,
11711185
struct delayed_call *done)
11721186
{

0 commit comments

Comments
 (0)