Lines Matching refs:sfd

278 static int __shm_open(struct shm_file_data *sfd)  in __shm_open()  argument
282 shp = shm_lock(sfd->ns, sfd->id); in __shm_open()
287 if (shp->shm_file != sfd->file) { in __shm_open()
304 struct shm_file_data *sfd = shm_file_data(file); in shm_open() local
308 if (sfd->vm_ops->open) in shm_open()
309 sfd->vm_ops->open(vma); in shm_open()
311 err = __shm_open(sfd); in shm_open()
368 static void __shm_close(struct shm_file_data *sfd) in __shm_close() argument
371 struct ipc_namespace *ns = sfd->ns; in __shm_close()
375 shp = shm_lock(ns, sfd->id); in __shm_close()
398 struct shm_file_data *sfd = shm_file_data(file); in shm_close() local
401 if (sfd->vm_ops->close) in shm_close()
402 sfd->vm_ops->close(vma); in shm_close()
404 __shm_close(sfd); in shm_close()
537 struct shm_file_data *sfd = shm_file_data(file); in shm_fault() local
539 return sfd->vm_ops->fault(vmf); in shm_fault()
545 struct shm_file_data *sfd = shm_file_data(file); in shm_may_split() local
547 if (sfd->vm_ops->may_split) in shm_may_split()
548 return sfd->vm_ops->may_split(vma, addr); in shm_may_split()
556 struct shm_file_data *sfd = shm_file_data(file); in shm_pagesize() local
558 if (sfd->vm_ops->pagesize) in shm_pagesize()
559 return sfd->vm_ops->pagesize(vma); in shm_pagesize()
568 struct shm_file_data *sfd = shm_file_data(file); in shm_set_policy() local
571 if (sfd->vm_ops->set_policy) in shm_set_policy()
572 err = sfd->vm_ops->set_policy(vma, new); in shm_set_policy()
580 struct shm_file_data *sfd = shm_file_data(file); in shm_get_policy() local
583 if (sfd->vm_ops->get_policy) in shm_get_policy()
584 pol = sfd->vm_ops->get_policy(vma, addr); in shm_get_policy()
594 struct shm_file_data *sfd = shm_file_data(file); in shm_mmap() local
602 ret = __shm_open(sfd); in shm_mmap()
606 ret = call_mmap(sfd->file, vma); in shm_mmap()
608 __shm_close(sfd); in shm_mmap()
611 sfd->vm_ops = vma->vm_ops; in shm_mmap()
613 WARN_ON(!sfd->vm_ops->fault); in shm_mmap()
621 struct shm_file_data *sfd = shm_file_data(file); in shm_release() local
623 put_ipc_ns(sfd->ns); in shm_release()
624 fput(sfd->file); in shm_release()
626 kfree(sfd); in shm_release()
632 struct shm_file_data *sfd = shm_file_data(file); in shm_fsync() local
634 if (!sfd->file->f_op->fsync) in shm_fsync()
636 return sfd->file->f_op->fsync(sfd->file, start, end, datasync); in shm_fsync()
642 struct shm_file_data *sfd = shm_file_data(file); in shm_fallocate() local
644 if (!sfd->file->f_op->fallocate) in shm_fallocate()
646 return sfd->file->f_op->fallocate(file, mode, offset, len); in shm_fallocate()
653 struct shm_file_data *sfd = shm_file_data(file); in shm_get_unmapped_area() local
655 return sfd->file->f_op->get_unmapped_area(sfd->file, addr, len, in shm_get_unmapped_area()
1534 struct shm_file_data *sfd; in do_shmat() local
1624 sfd = kzalloc(sizeof(*sfd), GFP_KERNEL); in do_shmat()
1625 if (!sfd) { in do_shmat()
1636 kfree(sfd); in do_shmat()
1641 sfd->id = shp->shm_perm.id; in do_shmat()
1642 sfd->ns = get_ipc_ns(ns); in do_shmat()
1643 sfd->file = base; in do_shmat()
1644 sfd->vm_ops = NULL; in do_shmat()
1645 file->private_data = sfd; in do_shmat()