autofs4 - fix dentry leak in autofs4_expire_direct()

There is a missing dput() when returning from autofs4_expire_direct()
when we see that the dentry is already a pending mount.

Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by Ian Kent and committed by Al Viro f9398c23 3c319985

+3 -4
+3 -4
fs/autofs4/expire.c
··· 290 290 spin_lock(&sbi->fs_lock); 291 291 ino = autofs4_dentry_ino(root); 292 292 /* No point expiring a pending mount */ 293 - if (ino->flags & AUTOFS_INF_PENDING) { 294 - spin_unlock(&sbi->fs_lock); 295 - return NULL; 296 - } 293 + if (ino->flags & AUTOFS_INF_PENDING) 294 + goto out; 297 295 if (!autofs4_direct_busy(mnt, root, timeout, do_now)) { 298 296 struct autofs_info *ino = autofs4_dentry_ino(root); 299 297 ino->flags |= AUTOFS_INF_EXPIRING; ··· 299 301 spin_unlock(&sbi->fs_lock); 300 302 return root; 301 303 } 304 + out: 302 305 spin_unlock(&sbi->fs_lock); 303 306 dput(root); 304 307