2016-03-16 05:58:25 +08:00
|
|
|
/*
|
|
|
|
* Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
|
2005-04-17 06:20:36 +08: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-16 05:58:25 +08:00
|
|
|
*/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#include "autofs_i.h"
|
|
|
|
|
2015-11-17 23:20:54 +08:00
|
|
|
static const char *autofs4_get_link(struct dentry *dentry,
|
2015-12-30 04:58:39 +08:00
|
|
|
struct inode *inode,
|
|
|
|
struct delayed_call *done)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2015-11-17 23:20:54 +08:00
|
|
|
struct autofs_sb_info *sbi;
|
|
|
|
struct autofs_info *ino;
|
2016-03-16 05:58:25 +08:00
|
|
|
|
2015-11-17 23:20:54 +08:00
|
|
|
if (!dentry)
|
|
|
|
return ERR_PTR(-ECHILD);
|
|
|
|
sbi = autofs4_sbi(dentry->d_sb);
|
|
|
|
ino = autofs4_dentry_ino(dentry);
|
2014-01-24 07:55:01 +08:00
|
|
|
if (ino && !autofs4_oz_mode(sbi))
|
|
|
|
ino->last_used = jiffies;
|
2015-05-03 01:32:22 +08:00
|
|
|
return d_inode(dentry)->i_private;
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2007-02-12 16:55:38 +08:00
|
|
|
const struct inode_operations autofs4_symlink_inode_operations = {
|
2005-04-17 06:20:36 +08:00
|
|
|
.readlink = generic_readlink,
|
2015-11-17 23:20:54 +08:00
|
|
|
.get_link = autofs4_get_link
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|