cifs - check S_AUTOMOUNT in revalidate
cifs - check S_AUTOMOUNT in revalidate

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 <0efec51fd7cf517793321ec68fd852811537b69c@themaw.net>
Reviewed-by: Jeff Layton <4376fbf8623cd7b7c0232225289bb91cedc0a27f@redhat.com>
Cc: Steve French <51565b4e5841e493fd669866e11ea3c7c0d781cc@gmail.com>
Cc: b6c52d765c0b71f41790656be9f258a9a42419a0@vger.kernel.org
Signed-off-by: Steve French <d47560e3bac353b8d509d093b1d727868ac7ddf3@us.ibm.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas