blob: ab0b4285a202c77ded6ab0c36d75621db281d1bc [file] [log] [blame]
Ian Kente9a7c2f2016-03-15 14:58:25 -07001/*
2 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * This file is part of the Linux kernel and is made available under
5 * the terms of the GNU General Public License, version 2, or at your
6 * option, any later version, incorporated herein by reference.
Ian Kente9a7c2f2016-03-15 14:58:25 -07007 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9#include "autofs_i.h"
10
Al Viro6b255392015-11-17 10:20:54 -050011static const char *autofs4_get_link(struct dentry *dentry,
Al Virofceef392015-12-29 15:58:39 -050012 struct inode *inode,
13 struct delayed_call *done)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014{
Al Viro6b255392015-11-17 10:20:54 -050015 struct autofs_sb_info *sbi;
16 struct autofs_info *ino;
Ian Kente9a7c2f2016-03-15 14:58:25 -070017
Al Viro6b255392015-11-17 10:20:54 -050018 if (!dentry)
19 return ERR_PTR(-ECHILD);
20 sbi = autofs4_sbi(dentry->d_sb);
21 ino = autofs4_dentry_ino(dentry);
Ian Kent8dc51fe2014-01-23 15:55:01 -080022 if (ino && !autofs4_oz_mode(sbi))
23 ino->last_used = jiffies;
Al Viro680baac2015-05-02 13:32:22 -040024 return d_inode(dentry)->i_private;
Linus Torvalds1da177e2005-04-16 15:20:36 -070025}
26
Arjan van de Ven754661f2007-02-12 00:55:38 -080027const struct inode_operations autofs4_symlink_inode_operations = {
Al Viro6b255392015-11-17 10:20:54 -050028 .get_link = autofs4_get_link
Linus Torvalds1da177e2005-04-16 15:20:36 -070029};