ms-nfs41-client/daemon
Casey Bodley d345a7b12e name cache: bug fix for name_cache_search()
symptom: in certain cases, name_cache_find_or_create() was returning ERROR_FILE_EXISTS, which should never happen!

cause: the string comparisons in name_cache_search() and name_cache_insert() were returning different results when the argument to name_cache_search() is a) not null-terminated, and b) shorter than the other string.  this caused name_cache_search() to search the wrong branch of the rbtree and fail to find the component, while name_cache_insert() would correctly find it and return ERROR_FILE_EXISTS

fix: compare the string lengths before calling strncmp() to avoid comparing past the end of the component.  moved the comparisons to a separate component_cmp() function called by both name_cache_search() and name_cache_insert() to make sure they get the same result!

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:48 -04:00
..
callback_server.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
callback_xdr.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
daemon_debug.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
daemon_debug.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
from_kernel.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
getattr.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
list.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
lock.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
lookup.c name cache: lookup semantics match nfs41_lookup() on NOENT 2010-10-12 10:35:47 -04:00
makefile fresh git tree for public release 2010-10-12 10:15:48 -04:00
mount.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
name_cache.c name cache: bug fix for name_cache_search() 2010-10-12 10:35:48 -04:00
name_cache.h name cache: insert supports negative entries 2010-10-12 10:35:43 -04:00
namespace.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_callback.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_client.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_compound.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_compound.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_const.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_daemon.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_ops.c name cache: LINK inserts target to name cache 2010-10-12 10:35:48 -04:00
nfs41_ops.h name cache: LINK inserts target to name cache 2010-10-12 10:35:48 -04:00
nfs41_rpc.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_server.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_session.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_superblock.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_types.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_xdr.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_xdr.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
open.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_debug.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_device.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_io.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_layout.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
rbtree.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
rbtree.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
readdir.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
readwrite.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
setattr.c name cache: LINK inserts target to name cache 2010-10-12 10:35:48 -04:00
sources fresh git tree for public release 2010-10-12 10:15:48 -04:00
upcall.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
upcall.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
util.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
util.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
volume.c fresh git tree for public release 2010-10-12 10:15:48 -04:00