函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:fs\locks.c Create Date:2022-07-29 10:59:18
首页 Copyright©Brick

405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
/*
 * Initialize a new lock from an existing file_lock structure.
 */
void locks_copy_conflock(struct file_lock *new, struct file_lock *fl)
{
    new->fl_owner = fl->fl_owner;
    new->fl_pid = fl->fl_pid;
    new->fl_file = NULL;
    new->fl_flags = fl->fl_flags;
    new->fl_type = fl->fl_type;
    new->fl_start = fl->fl_start;
    new->fl_end = fl->fl_end;
    new->fl_lmops = fl->fl_lmops;
    new->fl_ops = NULL;
 
    if (fl->fl_lmops) {
        if (fl->fl_lmops->lm_get_owner)
            fl->fl_lmops->lm_get_owner(fl->fl_owner);
    }
}