func: static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) struct inode * inode = file_inode ( file ) ; struct fuse_conn * fc = get_fuse_conn ( inode ) ; int err ; if ( cmd == F_CANCELLK )  if ( cmd == F_GETLK )  if ( fc -> no_lock )  err = fuse_getlk ( file , fl ); static int fuse_getlk(struct file *file, struct file_lock *fl) struct fuse_lk_in inarg ; fuse_lk_fill ( & args , file , fl , FUSE_GETLK , 0 , 0 , & inarg ); static void fuse_lk_fill(struct fuse_args *args, struct file const struct file_lock *fl, int opcode, pid_t int flock, struct fuse_lk_in *inarg) memset ( inarg , 0 , sizeof ( * inarg ) ); inarg -> fh = ff -> fh; inarg -> owner = fuse_lock_owner_id ( fc , fl -> fl_owner ); inarg -> lk . start = fl -> fl_start; inarg -> lk . end = fl -> fl_end; inarg -> lk . type = fl -> fl_type; inarg -> lk . pid = pid; inarg -> lk_flags |= FUSE_LK_FLOCK; args -> in . args [ 0 ] . size = sizeof ( * inarg ); args -> in . args [ 0 ] . value = inarg; 