cifs: don't compare uniqueids in cifs_prime_dcache unless server inode numbers are...
authorJeff Layton <jlayton@redhat.com>
Tue, 18 Dec 2012 11:35:10 +0000 (06:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:19:06 +0000 (09:19 -0800)
commit1dcfb28724803c27657b335dbb8f4494067d10e5
tree0b6a43c326317ae0a1b1a3988b3f138048f5072c
parent862dc356d36fd84c5673af61364447bd38b453c6
cifs: don't compare uniqueids in cifs_prime_dcache unless server inode numbers are in use

commit 2f2591a34db6c9361faa316c91a6e320cb4e6aee upstream.

Oliver reported that commit cd60042c caused his cifs mounts to
continually thrash through new inodes on readdir. His servers are not
sending inode numbers (or he's not using them), and the new test in
that function doesn't account for that sort of setup correctly.

If we're not using server inode numbers, then assume that the inode
attached to the dentry hasn't changed. Go ahead and update the
attributes in place, but keep the same inode number.

Reported-and-Tested-by: Oliver Mössinger <Oliver.Moessinger@ichaus.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/readdir.c