Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[firefly-linux-kernel-4.4.55.git] / fs / autofs4 / expire.c
index 11dd118f75e25e6a8f25f2143724901fb64c72a0..1cebc3c52fa5792242144c939908be50040b9e0b 100644 (file)
@@ -374,7 +374,7 @@ static struct dentry *should_expire(struct dentry *dentry,
                return NULL;
        }
 
-       if (dentry->d_inode && d_is_symlink(dentry)) {
+       if (d_really_is_positive(dentry) && d_is_symlink(dentry)) {
                DPRINTK("checking symlink %p %pd", dentry, dentry);
                /*
                 * A symlink can't be "busy" in the usual sense so