Re: [PATH v3 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread David Miller
From: yuan linyu Date: Sat, 11 Feb 2017 11:41:17 +0800 > From: yuan linyu > > 'max' only used at three places in scm.c, > 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; > 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) > 3. in scm_fp_dup(),

[PATH v3 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu 'max' only used at three places in scm.c, 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) 3. in scm_fp_dup(), new_fpl->max = new_fpl->count; at place 3, the worst case is new_fpl->count =