symlink.c 829 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
  3. *
  4. * This file is part of the Linux kernel and is made available under
  5. * the terms of the GNU General Public License, version 2, or at your
  6. * option, any later version, incorporated herein by reference.
  7. */
  8. #include "autofs_i.h"
  9. static const char *autofs4_get_link(struct dentry *dentry,
  10. struct inode *inode,
  11. struct delayed_call *done)
  12. {
  13. struct autofs_sb_info *sbi;
  14. struct autofs_info *ino;
  15. if (!dentry)
  16. return ERR_PTR(-ECHILD);
  17. sbi = autofs4_sbi(dentry->d_sb);
  18. ino = autofs4_dentry_ino(dentry);
  19. if (ino && !autofs4_oz_mode(sbi))
  20. ino->last_used = jiffies;
  21. return d_inode(dentry)->i_private;
  22. }
  23. const struct inode_operations autofs4_symlink_inode_operations = {
  24. .readlink = generic_readlink,
  25. .get_link = autofs4_get_link
  26. };