Lines Matching full:sfd
279 static int __shm_open(struct shm_file_data *sfd) in __shm_open() argument
283 shp = shm_lock(sfd->ns, sfd->id); in __shm_open()
288 if (shp->shm_file != sfd->file) { in __shm_open()
305 struct shm_file_data *sfd = shm_file_data(file); in shm_open() local
309 if (sfd->vm_ops->open) in shm_open()
310 sfd->vm_ops->open(vma); in shm_open()
312 err = __shm_open(sfd); in shm_open()
369 static void __shm_close(struct shm_file_data *sfd) in __shm_close() argument
372 struct ipc_namespace *ns = sfd->ns; in __shm_close()
376 shp = shm_lock(ns, sfd->id); in __shm_close()
399 struct shm_file_data *sfd = shm_file_data(file); in shm_close() local
402 if (sfd->vm_ops->close) in shm_close()
403 sfd->vm_ops->close(vma); in shm_close()
405 __shm_close(sfd); in shm_close()
538 struct shm_file_data *sfd = shm_file_data(file); in shm_fault() local
540 return sfd->vm_ops->fault(vmf); in shm_fault()
546 struct shm_file_data *sfd = shm_file_data(file); in shm_may_split() local
548 if (sfd->vm_ops->may_split) in shm_may_split()
549 return sfd->vm_ops->may_split(vma, addr); in shm_may_split()
557 struct shm_file_data *sfd = shm_file_data(file); in shm_pagesize() local
559 if (sfd->vm_ops->pagesize) in shm_pagesize()
560 return sfd->vm_ops->pagesize(vma); in shm_pagesize()
568 struct shm_file_data *sfd = shm_file_data(vma->vm_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, mpol); in shm_set_policy()
579 struct shm_file_data *sfd = shm_file_data(vma->vm_file); in shm_get_policy() local
582 if (sfd->vm_ops->get_policy) in shm_get_policy()
583 mpol = sfd->vm_ops->get_policy(vma, addr, ilx); in shm_get_policy()
590 struct shm_file_data *sfd = shm_file_data(file); in shm_mmap() local
598 ret = __shm_open(sfd); in shm_mmap()
602 ret = call_mmap(sfd->file, vma); in shm_mmap()
604 __shm_close(sfd); in shm_mmap()
607 sfd->vm_ops = vma->vm_ops; in shm_mmap()
609 WARN_ON(!sfd->vm_ops->fault); in shm_mmap()
617 struct shm_file_data *sfd = shm_file_data(file); in shm_release() local
619 put_ipc_ns(sfd->ns); in shm_release()
620 fput(sfd->file); in shm_release()
622 kfree(sfd); in shm_release()
628 struct shm_file_data *sfd = shm_file_data(file); in shm_fsync() local
630 if (!sfd->file->f_op->fsync) in shm_fsync()
632 return sfd->file->f_op->fsync(sfd->file, start, end, datasync); in shm_fsync()
638 struct shm_file_data *sfd = shm_file_data(file); in shm_fallocate() local
640 if (!sfd->file->f_op->fallocate) in shm_fallocate()
642 return sfd->file->f_op->fallocate(file, mode, offset, len); in shm_fallocate()
649 struct shm_file_data *sfd = shm_file_data(file); in shm_get_unmapped_area() local
651 return sfd->file->f_op->get_unmapped_area(sfd->file, addr, len, in shm_get_unmapped_area()
1526 struct shm_file_data *sfd; in do_shmat() local
1616 sfd = kzalloc(sizeof(*sfd), GFP_KERNEL); in do_shmat()
1617 if (!sfd) { in do_shmat()
1628 kfree(sfd); in do_shmat()
1633 sfd->id = shp->shm_perm.id; in do_shmat()
1634 sfd->ns = get_ipc_ns(ns); in do_shmat()
1635 sfd->file = base; in do_shmat()
1636 sfd->vm_ops = NULL; in do_shmat()
1637 file->private_data = sfd; in do_shmat()