aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/autofs4/expire.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index c896dd6c1ea..c403abcc725 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -290,10 +290,8 @@ struct dentry *autofs4_expire_direct(struct super_block *sb,
290 spin_lock(&sbi->fs_lock); 290 spin_lock(&sbi->fs_lock);
291 ino = autofs4_dentry_ino(root); 291 ino = autofs4_dentry_ino(root);
292 /* No point expiring a pending mount */ 292 /* No point expiring a pending mount */
293 if (ino->flags & AUTOFS_INF_PENDING) { 293 if (ino->flags & AUTOFS_INF_PENDING)
294 spin_unlock(&sbi->fs_lock); 294 goto out;
295 return NULL;
296 }
297 if (!autofs4_direct_busy(mnt, root, timeout, do_now)) { 295 if (!autofs4_direct_busy(mnt, root, timeout, do_now)) {
298 struct autofs_info *ino = autofs4_dentry_ino(root); 296 struct autofs_info *ino = autofs4_dentry_ino(root);
299 ino->flags |= AUTOFS_INF_EXPIRING; 297 ino->flags |= AUTOFS_INF_EXPIRING;
@@ -301,6 +299,7 @@ struct dentry *autofs4_expire_direct(struct super_block *sb,
301 spin_unlock(&sbi->fs_lock); 299 spin_unlock(&sbi->fs_lock);
302 return root; 300 return root;
303 } 301 }
302out:
304 spin_unlock(&sbi->fs_lock); 303 spin_unlock(&sbi->fs_lock);
305 dput(root); 304 dput(root);
306 305