2016-03-15 15:58:25 -06:00
|
|
|
/*
|
|
|
|
* Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* This file is part of the Linux kernel and is made available under
|
|
|
|
* the terms of the GNU General Public License, version 2, or at your
|
|
|
|
* option, any later version, incorporated herein by reference.
|
2016-03-15 15:58:25 -06:00
|
|
|
*/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#include "autofs_i.h"
|
|
|
|
|
2015-11-17 08:20:54 -07:00
|
|
|
static const char *autofs4_get_link(struct dentry *dentry,
|
2015-12-29 13:58:39 -07:00
|
|
|
struct inode *inode,
|
|
|
|
struct delayed_call *done)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2015-11-17 08:20:54 -07:00
|
|
|
struct autofs_sb_info *sbi;
|
|
|
|
struct autofs_info *ino;
|
2016-03-15 15:58:25 -06:00
|
|
|
|
2015-11-17 08:20:54 -07:00
|
|
|
if (!dentry)
|
|
|
|
return ERR_PTR(-ECHILD);
|
|
|
|
sbi = autofs4_sbi(dentry->d_sb);
|
|
|
|
ino = autofs4_dentry_ino(dentry);
|
2014-01-23 16:55:01 -07:00
|
|
|
if (ino && !autofs4_oz_mode(sbi))
|
|
|
|
ino->last_used = jiffies;
|
2015-05-02 11:32:22 -06:00
|
|
|
return d_inode(dentry)->i_private;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2007-02-12 01:55:38 -07:00
|
|
|
const struct inode_operations autofs4_symlink_inode_operations = {
|
2005-04-16 16:20:36 -06:00
|
|
|
.readlink = generic_readlink,
|
2015-11-17 08:20:54 -07:00
|
|
|
.get_link = autofs4_get_link
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|