diff options
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r-- | fs/autofs4/root.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index d79ced925861..82e8f6edfb48 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -281,8 +281,8 @@ static int autofs4_mount_wait(const struct path *path, bool rcu_walk) | |||
281 | pr_debug("waiting for mount name=%pd\n", path->dentry); | 281 | pr_debug("waiting for mount name=%pd\n", path->dentry); |
282 | status = autofs4_wait(sbi, path, NFY_MOUNT); | 282 | status = autofs4_wait(sbi, path, NFY_MOUNT); |
283 | pr_debug("mount wait done status=%d\n", status); | 283 | pr_debug("mount wait done status=%d\n", status); |
284 | ino->last_used = jiffies; | ||
285 | } | 284 | } |
285 | ino->last_used = jiffies; | ||
286 | return status; | 286 | return status; |
287 | } | 287 | } |
288 | 288 | ||
@@ -321,21 +321,16 @@ static struct dentry *autofs4_mountpoint_changed(struct path *path) | |||
321 | */ | 321 | */ |
322 | if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) { | 322 | if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) { |
323 | struct dentry *parent = dentry->d_parent; | 323 | struct dentry *parent = dentry->d_parent; |
324 | struct autofs_info *ino; | ||
324 | struct dentry *new; | 325 | struct dentry *new; |
325 | 326 | ||
326 | new = d_lookup(parent, &dentry->d_name); | 327 | new = d_lookup(parent, &dentry->d_name); |
327 | if (!new) | 328 | if (!new) |
328 | return NULL; | 329 | return NULL; |
329 | if (new == dentry) | 330 | ino = autofs4_dentry_ino(new); |
330 | dput(new); | 331 | ino->last_used = jiffies; |
331 | else { | 332 | dput(path->dentry); |
332 | struct autofs_info *ino; | 333 | path->dentry = new; |
333 | |||
334 | ino = autofs4_dentry_ino(new); | ||
335 | ino->last_used = jiffies; | ||
336 | dput(path->dentry); | ||
337 | path->dentry = new; | ||
338 | } | ||
339 | } | 334 | } |
340 | return path->dentry; | 335 | return path->dentry; |
341 | } | 336 | } |