symlink.c 629 B

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