Commit 3c8a8326 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

headers: Drop SCM_MAX_FD internal variable

This limit is not exported by a kernel, so no need
to "explicitly" define it pretending that it's immutable.

Still I kept this name in comment just to give reader
a tip where CR_SCM_MAX_FD came from.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8f64a14a
...@@ -152,11 +152,6 @@ enum kcmp_type { ...@@ -152,11 +152,6 @@ enum kcmp_type {
KCMP_TYPES, KCMP_TYPES,
}; };
/* For UNIX sockets data */
#ifndef SCM_MAX_FD
# define SCM_MAX_FD 253
#endif
/* File handle */ /* File handle */
typedef struct { typedef struct {
u32 bytes; u32 bytes;
......
...@@ -176,11 +176,6 @@ enum kcmp_type { ...@@ -176,11 +176,6 @@ enum kcmp_type {
KCMP_TYPES, KCMP_TYPES,
}; };
/* For UNIX sockets data */
#ifndef SCM_MAX_FD
# define SCM_MAX_FD 253
#endif
/* File handle */ /* File handle */
typedef struct { typedef struct {
u32 bytes; u32 bytes;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* /*
* Because of kernel doing kmalloc for user data passed * Because of kernel doing kmalloc for user data passed
* in SCM messages, and there is SCM_MAX_FD as a limit * in SCM messages, and there is kernel's SCM_MAX_FD as a limit
* for descriptors passed at once we're trying to reduce * for descriptors passed at once we're trying to reduce
* the pressue on kernel memory manager and use predefined * the pressue on kernel memory manager and use predefined
* known to work well size of the message buffer. * known to work well size of the message buffer.
......
...@@ -33,7 +33,6 @@ static int *scm_fdset_init(struct scm_fdset *fdset, struct sockaddr_un *saddr, ...@@ -33,7 +33,6 @@ static int *scm_fdset_init(struct scm_fdset *fdset, struct sockaddr_un *saddr,
{ {
struct cmsghdr *cmsg; struct cmsghdr *cmsg;
BUILD_BUG_ON(CR_SCM_MAX_FD > SCM_MAX_FD);
BUILD_BUG_ON(sizeof(fdset->msg_buf) < (CMSG_SPACE(sizeof(int) * CR_SCM_MAX_FD))); BUILD_BUG_ON(sizeof(fdset->msg_buf) < (CMSG_SPACE(sizeof(int) * CR_SCM_MAX_FD)));
fdset->iov.iov_base = fdset->opts; fdset->iov.iov_base = fdset->opts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment