]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: clean up handling when server doesn't consistently support inode numbers
authorJeff Layton <jlayton@redhat.com>
Fri, 6 Nov 2009 19:18:29 +0000 (14:18 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:20:52 +0000 (10:20 -0800)
commitad4316779dc2ca73c3d2b11d0f13ff3d3b0fa100
tree1a629b2aaee9f1257ff1ae9463b72833187a9668
parent6804b96f48a32bca16fee60212ad8e4b201bb99f
cifs: clean up handling when server doesn't consistently support inode numbers

commit ec06aedd44541129840ed52e6165afa3796a27bf upstream.

It's possible that a server will return a valid FileID when we query the
FILE_INTERNAL_INFO for the root inode, but then zeroed out inode numbers
when we do a FindFile with an infolevel of
SMB_FIND_FILE_ID_FULL_DIR_INFO.

In this situation turn off querying for server inode numbers, generate a
warning for the user and just generate an inode number using iunique.
Once we generate any inode number with iunique we can no longer use any
server inode numbers or we risk collisions, so ensure that we don't do
that in cifs_get_inode_info either.

Reported-by: Timothy Normand Miller <theosib@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/cifsproto.h
fs/cifs/inode.c
fs/cifs/misc.c
fs/cifs/readdir.c