]> Pileus Git - ~andy/linux/blobdiff - fs/autofs4/expire.c
Merge tag 'pwm/for-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
[~andy/linux] / fs / autofs4 / expire.c
index 3d9d3f5d5dda688bcd9bfc666210553ffa73be0d..394e90b02c5e60783b828a2d39d7698806505930 100644 (file)
@@ -402,6 +402,20 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
                        goto next;
                }
 
+               if (dentry->d_inode && S_ISLNK(dentry->d_inode->i_mode)) {
+                       DPRINTK("checking symlink %p %.*s",
+                               dentry, (int)dentry->d_name.len, dentry->d_name.name);
+                       /*
+                        * A symlink can't be "busy" in the usual sense so
+                        * just check last used for expire timeout.
+                        */
+                       if (autofs4_can_expire(dentry, timeout, do_now)) {
+                               expired = dentry;
+                               goto found;
+                       }
+                       goto next;
+               }
+
                if (simple_empty(dentry))
                        goto next;