On Tue, 1 May 2012 22:23:37 -0500 Steve French <smfrench@xxxxxxxxx> wrote: > You may have corrupted the patch by cut&paste. Would you resend it? > Checkpatch fails repeatedly with errors like: > > ERROR: trailing whitespace > #84: FILE: fs/cifs/dir.c:671: > +^I^I^I * If the inode wasn't known to be a dfs entry when^M$ > Hmmm...the only checkpatch warnings I saw were these trivial ones, which it looks to be getting out of the header of the email. -------------------[snip]------------------ $ ./scripts/checkpatch.pl \[PATCH\]\ cifs\ -\ check\ S_AUTOMOUNT\ in\ revalidate WARNING: Use a single space after To: #47: To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> WARNING: Use a single space after Cc: #48: Cc: Jeff Layton <jlayton@xxxxxxxxxx>, total: 0 errors, 2 warnings, 24 lines checked [PATCH] cifs - check S_AUTOMOUNT in revalidate has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. -------------------[snip]------------------ I don't see any trailing whitespace. In any case, I went ahead and pushed it to my cifs-3.4 branch if you want to just cherry-pick it from there... > > On Fri, Apr 27, 2012 at 3:18 AM, Ian Kent <raven@xxxxxxxxxx> wrote: > > When revalidating a dentry, if the inode wasn't known to be a dfs > > entry when the dentry was instantiated, such as when created via > > ->readdir(), the DCACHE_NEED_AUTOMOUNT flag needs to be set on the > > dentry in ->d_revalidate(). > > > > The false return from cifs_d_revalidate(), due to the inode now > > being marked with the S_AUTOMOUNT flag, might not invalidate the > > dentry if there is a concurrent unlazy path walk. This is because > > the dentry reference count will be at least 2 in this case causing > > d_invalidate() to return EBUSY. So the asumption that the dentry > > will be discarded then correctly instantiated via ->lookup() might > > not hold. > > > > Signed-off-by: Ian Kent <raven@xxxxxxxxxx> > > Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx> > > Cc: Steve French <smfrench@xxxxxxxxx> > > Cc: linux-cifs@xxxxxxxxxxxxxxx > > --- > > > > fs/cifs/dir.c | 17 ++++++++++++----- > > 1 files changed, 12 insertions(+), 5 deletions(-) > > > > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c > > index d172c8e..ec4e9a2 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; > > } > > } > > > > > -- Jeff Layton <jlayton@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html