leaving one max_component len constant
both NFS41_MAX_COMPONENT_SIZE and NFS41_MAX_COMPONENT_LEN represented the same value.
This commit is contained in:
parent
11a13bef0f
commit
9dd4708aed
3 changed files with 3 additions and 5 deletions
|
|
@ -360,7 +360,7 @@ static void copy_attrs(
|
|||
/* name cache */
|
||||
RB_HEAD(name_tree, name_cache_entry);
|
||||
struct name_cache_entry {
|
||||
char component[NFS41_MAX_COMPONENT_SIZE];
|
||||
char component[NFS41_MAX_COMPONENT_LEN];
|
||||
nfs41_fh fh;
|
||||
RB_ENTRY(name_cache_entry) rbnode;
|
||||
struct name_tree rbchildren;
|
||||
|
|
@ -608,7 +608,7 @@ static struct name_cache_entry* name_cache_search(
|
|||
dprintf(NCLVL2, "--> name_cache_search('%.*s' under '%s')\n",
|
||||
component->len, component->name, parent->component);
|
||||
|
||||
StringCchCopyNA(tmp.component, NFS41_MAX_COMPONENT_SIZE,
|
||||
StringCchCopyNA(tmp.component, NFS41_MAX_COMPONENT_LEN,
|
||||
component->name, component->len);
|
||||
tmp.component_len = component->len;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
#define NFS41_MAX_SERVER_CACHE 1024
|
||||
#define NFS41_MAX_RPC_REQS 128
|
||||
|
||||
#define NFS41_MAX_COMPONENT_SIZE 64
|
||||
|
||||
#define UPCALL_BUF_SIZE 2048
|
||||
|
||||
/* MaximumComponentNameLength reported for FileFsAttributeInformation */
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ static int handle_readdir(nfs41_upcall *upcall)
|
|||
bool_t eof;
|
||||
/* make sure we allocate enough space for one nfs41_readdir_entry */
|
||||
const uint32_t max_buf_len = max(args->buf_len,
|
||||
sizeof(nfs41_readdir_entry) + NFS41_MAX_COMPONENT_SIZE);
|
||||
sizeof(nfs41_readdir_entry) + NFS41_MAX_COMPONENT_LEN);
|
||||
|
||||
dprintf(1, "-> handle_nfs41_dirquery(%s,%d,%d,%d)\n",
|
||||
args->filter, args->initial, args->restart, args->single);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue