diff options
Diffstat (limited to 'fs/autofs4/symlink.c')
-rw-r--r-- | fs/autofs4/symlink.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/autofs4/symlink.c b/fs/autofs4/symlink.c index da0c33481bc0..39e6f0bdf8e3 100644 --- a/fs/autofs4/symlink.c +++ b/fs/autofs4/symlink.c | |||
@@ -12,10 +12,15 @@ | |||
12 | 12 | ||
13 | #include "autofs_i.h" | 13 | #include "autofs_i.h" |
14 | 14 | ||
15 | static const char *autofs4_follow_link(struct dentry *dentry, void **cookie) | 15 | static const char *autofs4_get_link(struct dentry *dentry, |
16 | struct inode *inode, void **cookie) | ||
16 | { | 17 | { |
17 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | 18 | struct autofs_sb_info *sbi; |
18 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | 19 | struct autofs_info *ino; |
20 | if (!dentry) | ||
21 | return ERR_PTR(-ECHILD); | ||
22 | sbi = autofs4_sbi(dentry->d_sb); | ||
23 | ino = autofs4_dentry_ino(dentry); | ||
19 | if (ino && !autofs4_oz_mode(sbi)) | 24 | if (ino && !autofs4_oz_mode(sbi)) |
20 | ino->last_used = jiffies; | 25 | ino->last_used = jiffies; |
21 | return d_inode(dentry)->i_private; | 26 | return d_inode(dentry)->i_private; |
@@ -23,5 +28,5 @@ static const char *autofs4_follow_link(struct dentry *dentry, void **cookie) | |||
23 | 28 | ||
24 | const struct inode_operations autofs4_symlink_inode_operations = { | 29 | const struct inode_operations autofs4_symlink_inode_operations = { |
25 | .readlink = generic_readlink, | 30 | .readlink = generic_readlink, |
26 | .follow_link = autofs4_follow_link | 31 | .get_link = autofs4_get_link |
27 | }; | 32 | }; |