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