X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fcifs%2Fdir.c;h=ec4e9a2a12f843edf9e8d2f60c8a32f58011ec4d;hb=53f2c4a8fd882009a2a75c5b72d6898c0808616e;hp=d172c8ed901786f9e72ee40a50cb6bc22a3be571;hpb=b29e2679d0da91c60d3ac190d9c3bd65ac2f68c5;p=~andy%2Flinux diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index d172c8ed901..ec4e9a2a12f 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -668,12 +668,19 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) return 0; else { /* - * Forcibly invalidate automounting directory inodes - * (remote DFS directories) so to have them - * instantiated again for automount + * If the inode wasn't known to be a dfs entry when + * the dentry was instantiated, such as when created + * via ->readdir(), it needs to be set now since the + * attributes will have been updated by + * cifs_revalidate_dentry(). */ - if (IS_AUTOMOUNT(direntry->d_inode)) - return 0; + if (IS_AUTOMOUNT(direntry->d_inode) && + !(direntry->d_flags & DCACHE_NEED_AUTOMOUNT)) { + spin_lock(&direntry->d_lock); + direntry->d_flags |= DCACHE_NEED_AUTOMOUNT; + spin_unlock(&direntry->d_lock); + } + return 1; } }