blob: 7ac67dc76039572969ac098150d153f2010f3cf7 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-or-later
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
6#include "autofs_i.h"
7
8static const char *autofs_get_link(struct dentry *dentry,
9 struct inode *inode,
10 struct delayed_call *done)
11{
12 struct autofs_sb_info *sbi;
13 struct autofs_info *ino;
14
15 if (!dentry)
16 return ERR_PTR(-ECHILD);
17 sbi = autofs_sbi(dentry->d_sb);
18 ino = autofs_dentry_ino(dentry);
19 if (ino && !autofs_oz_mode(sbi))
20 ino->last_used = jiffies;
21 return d_inode(dentry)->i_private;
22}
23
24const struct inode_operations autofs_symlink_inode_operations = {
25 .get_link = autofs_get_link
26};