]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: don't instantiate new dentries in readdir for inodes that need to be revalidate...
authorJeff Layton <jlayton@redhat.com>
Wed, 7 Aug 2013 14:29:08 +0000 (10:29 -0400)
committerSteve French <smfrench@gmail.com>
Wed, 7 Aug 2013 15:57:06 +0000 (10:57 -0500)
commit15d14e19c5840d334db9731cc90900eb681e8a9c
tree2c6bf3cbda81fd56969c6b8d51a32baba5d6f5e3
parent1fcf72a573c18620df94290728ce610e87136a65
cifs: don't instantiate new dentries in readdir for inodes that need to be revalidated immediately

David reported that commit 64fcb7f9 (cifs: only set ops for inodes in
I_NEW state) caused a regression with mfsymlinks. Prior to that patch,
if a mfsymlink dentry was instantiated at readdir time, the inode would
get a new set of ops when it was revalidated. After that patch, this
did not occur.

This patch addresses this by simply skipping instantiating dentries in
the readdir codepath when we know that they will need to be immediately
revalidated. The next attempt to use that dentry will cause a new lookup
to occur (which is basically what we want to happen anyway).

Cc: <stable@vger.kernel.org>
Cc: "Stefan (metze) Metzmacher" <metze@samba.org>
Cc: Sachin Prabhu <sprabhu@redhat.com>
Reported-and-Tested-by: David McBride <dwm37@cam.ac.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/readdir.c