Lines Matching refs:fpl
68 struct scm_fp_list *fpl = *fplp; in scm_fp_copy() local
80 if (!fpl) in scm_fp_copy()
82 fpl = kmalloc(sizeof(struct scm_fp_list), GFP_KERNEL); in scm_fp_copy()
83 if (!fpl) in scm_fp_copy()
85 *fplp = fpl; in scm_fp_copy()
86 fpl->count = 0; in scm_fp_copy()
87 fpl->max = SCM_MAX_FD; in scm_fp_copy()
88 fpl->user = NULL; in scm_fp_copy()
90 fpp = &fpl->fp[fpl->count]; in scm_fp_copy()
92 if (fpl->count + num > fpl->max) in scm_fp_copy()
107 fpl->count++; in scm_fp_copy()
110 if (!fpl->user) in scm_fp_copy()
111 fpl->user = get_uid(current_user()); in scm_fp_copy()
118 struct scm_fp_list *fpl = scm->fp; in __scm_destroy() local
121 if (fpl) { in __scm_destroy()
123 for (i=fpl->count-1; i>=0; i--) in __scm_destroy()
124 fput(fpl->fp[i]); in __scm_destroy()
125 free_uid(fpl->user); in __scm_destroy()
126 kfree(fpl); in __scm_destroy()
342 struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl) in scm_fp_dup() argument
347 if (!fpl) in scm_fp_dup()
350 new_fpl = kmemdup(fpl, offsetof(struct scm_fp_list, fp[fpl->count]), in scm_fp_dup()
353 for (i = 0; i < fpl->count; i++) in scm_fp_dup()
354 get_file(fpl->fp[i]); in scm_fp_dup()
356 new_fpl->user = get_uid(fpl->user); in scm_fp_dup()