X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Flockd%2Fxdr.h;h=d7a5cc4cfa973ab049ef69e6b93379aff7fe87c1;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=ef14dbd2a67c5a24796dd8d6a8bf90b2c16f59ab;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index ef14dbd2a..d7a5cc4cf 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h @@ -13,10 +13,9 @@ #include #include +#define NLM_MAXCOOKIELEN 32 #define NLM_MAXSTRLEN 1024 -#define QUADLEN(len) (((len) + 3) >> 2) - #define nlm_granted __constant_htonl(NLM_LCK_GRANTED) #define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED) #define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS) @@ -33,13 +32,14 @@ struct nlm_lock { }; /* - * NLM cookies. Technically they can be 1K, Nobody uses over 8 bytes - * however. + * NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes. + * FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to + * 32 bytes. */ struct nlm_cookie { - unsigned char data[8]; + unsigned char data[NLM_MAXCOOKIELEN]; unsigned int len; };