aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r--fs/autofs4/root.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 541b19e6fec9..14aa70282e8c 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -86,7 +86,7 @@ static int autofs4_root_readdir(struct file *file, void *dirent,
86 86
87/* Update usage from here to top of tree, so that scan of 87/* Update usage from here to top of tree, so that scan of
88 top-level directories will give a useful result */ 88 top-level directories will give a useful result */
89static void autofs4_update_usage(struct dentry *dentry) 89static void autofs4_update_usage(struct vfsmount *mnt, struct dentry *dentry)
90{ 90{
91 struct dentry *top = dentry->d_sb->s_root; 91 struct dentry *top = dentry->d_sb->s_root;
92 92
@@ -95,7 +95,7 @@ static void autofs4_update_usage(struct dentry *dentry)
95 struct autofs_info *ino = autofs4_dentry_ino(dentry); 95 struct autofs_info *ino = autofs4_dentry_ino(dentry);
96 96
97 if (ino) { 97 if (ino) {
98 update_atime(dentry->d_inode); 98 touch_atime(mnt, dentry);
99 ino->last_used = jiffies; 99 ino->last_used = jiffies;
100 } 100 }
101 } 101 }
@@ -289,10 +289,10 @@ out:
289 return autofs4_dcache_readdir(file, dirent, filldir); 289 return autofs4_dcache_readdir(file, dirent, filldir);
290} 290}
291 291
292static int try_to_fill_dentry(struct dentry *dentry, 292static int try_to_fill_dentry(struct vfsmount *mnt, struct dentry *dentry, int flags)
293 struct super_block *sb,
294 struct autofs_sb_info *sbi, int flags)
295{ 293{
294 struct super_block *sb = mnt->mnt_sb;
295 struct autofs_sb_info *sbi = autofs4_sbi(sb);
296 struct autofs_info *de_info = autofs4_dentry_ino(dentry); 296 struct autofs_info *de_info = autofs4_dentry_ino(dentry);
297 int status = 0; 297 int status = 0;
298 298
@@ -367,7 +367,7 @@ static int try_to_fill_dentry(struct dentry *dentry,
367 /* We don't update the usages for the autofs daemon itself, this 367 /* We don't update the usages for the autofs daemon itself, this
368 is necessary for recursive autofs mounts */ 368 is necessary for recursive autofs mounts */
369 if (!autofs4_oz_mode(sbi)) 369 if (!autofs4_oz_mode(sbi))
370 autofs4_update_usage(dentry); 370 autofs4_update_usage(mnt, dentry);
371 371
372 spin_lock(&dentry->d_lock); 372 spin_lock(&dentry->d_lock);
373 dentry->d_flags &= ~DCACHE_AUTOFS_PENDING; 373 dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
@@ -392,7 +392,7 @@ static int autofs4_revalidate(struct dentry * dentry, struct nameidata *nd)
392 /* Pending dentry */ 392 /* Pending dentry */
393 if (autofs4_ispending(dentry)) { 393 if (autofs4_ispending(dentry)) {
394 if (!oz_mode) 394 if (!oz_mode)
395 status = try_to_fill_dentry(dentry, dir->i_sb, sbi, flags); 395 status = try_to_fill_dentry(nd->mnt, dentry, flags);
396 return status; 396 return status;
397 } 397 }
398 398
@@ -409,14 +409,14 @@ static int autofs4_revalidate(struct dentry * dentry, struct nameidata *nd)
409 dentry, dentry->d_name.len, dentry->d_name.name); 409 dentry, dentry->d_name.len, dentry->d_name.name);
410 spin_unlock(&dcache_lock); 410 spin_unlock(&dcache_lock);
411 if (!oz_mode) 411 if (!oz_mode)
412 status = try_to_fill_dentry(dentry, dir->i_sb, sbi, flags); 412 status = try_to_fill_dentry(nd->mnt, dentry, flags);
413 return status; 413 return status;
414 } 414 }
415 spin_unlock(&dcache_lock); 415 spin_unlock(&dcache_lock);
416 416
417 /* Update the usage list */ 417 /* Update the usage list */
418 if (!oz_mode) 418 if (!oz_mode)
419 autofs4_update_usage(dentry); 419 autofs4_update_usage(nd->mnt, dentry);
420 420
421 return 1; 421 return 1;
422} 422}