^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include "autofs_i.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) static const char *autofs_get_link(struct dentry *dentry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct delayed_call *done)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct autofs_sb_info *sbi;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct autofs_info *ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) if (!dentry)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) return ERR_PTR(-ECHILD);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) sbi = autofs_sbi(dentry->d_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) ino = autofs_dentry_ino(dentry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) if (ino && !autofs_oz_mode(sbi))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ino->last_used = jiffies;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) return d_inode(dentry)->i_private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) const struct inode_operations autofs_symlink_inode_operations = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) .get_link = autofs_get_link
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) };