aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smbfs/dir.c')
-rw-r--r--fs/smbfs/dir.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c
index 00a70cab1f36..f678d421e541 100644
--- a/fs/smbfs/dir.c
+++ b/fs/smbfs/dir.c
@@ -406,21 +406,15 @@ void
406smb_renew_times(struct dentry * dentry) 406smb_renew_times(struct dentry * dentry)
407{ 407{
408 dget(dentry); 408 dget(dentry);
409 spin_lock(&dentry->d_lock); 409 dentry->d_time = jiffies;
410 for (;;) {
411 struct dentry *parent;
412 410
413 dentry->d_time = jiffies; 411 while (!IS_ROOT(dentry)) {
414 if (IS_ROOT(dentry)) 412 struct dentry *parent = dget_parent(dentry);
415 break;
416 parent = dentry->d_parent;
417 dget(parent);
418 spin_unlock(&dentry->d_lock);
419 dput(dentry); 413 dput(dentry);
420 dentry = parent; 414 dentry = parent;
421 spin_lock(&dentry->d_lock); 415
416 dentry->d_time = jiffies;
422 } 417 }
423 spin_unlock(&dentry->d_lock);
424 dput(dentry); 418 dput(dentry);
425} 419}
426 420