Lines Matching full: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()
540 struct shm_file_data *sfd = shm_file_data(file); in shm_fault() local
542 return sfd->vm_ops->fault(vmf); in shm_fault()
548 struct shm_file_data *sfd = shm_file_data(file); in shm_may_split() local
550 if (sfd->vm_ops->may_split) in shm_may_split()
551 return sfd->vm_ops->may_split(vma, addr); in shm_may_split()
559 struct shm_file_data *sfd = shm_file_data(file); in shm_pagesize() local
561 if (sfd->vm_ops->pagesize) in shm_pagesize()
562 return sfd->vm_ops->pagesize(vma); in shm_pagesize()
571 struct shm_file_data *sfd = shm_file_data(file); in shm_set_policy() local
574 if (sfd->vm_ops->set_policy) in shm_set_policy()
575 err = sfd->vm_ops->set_policy(vma, new); in shm_set_policy()
583 struct shm_file_data *sfd = shm_file_data(file); in shm_get_policy() local
586 if (sfd->vm_ops->get_policy) in shm_get_policy()
587 pol = sfd->vm_ops->get_policy(vma, addr); in shm_get_policy()
597 struct shm_file_data *sfd = shm_file_data(file); in shm_mmap() local
605 ret = __shm_open(sfd); in shm_mmap()
609 ret = call_mmap(sfd->file, vma); in shm_mmap()
611 __shm_close(sfd); in shm_mmap()
614 sfd->vm_ops = vma->vm_ops; in shm_mmap()
616 WARN_ON(!sfd->vm_ops->fault); in shm_mmap()
624 struct shm_file_data *sfd = shm_file_data(file); in shm_release() local
626 put_ipc_ns(sfd->ns); in shm_release()
627 fput(sfd->file); in shm_release()
629 kfree(sfd); in shm_release()
635 struct shm_file_data *sfd = shm_file_data(file); in shm_fsync() local
637 if (!sfd->file->f_op->fsync) in shm_fsync()
639 return sfd->file->f_op->fsync(sfd->file, start, end, datasync); in shm_fsync()
645 struct shm_file_data *sfd = shm_file_data(file); in shm_fallocate() local
647 if (!sfd->file->f_op->fallocate) in shm_fallocate()
649 return sfd->file->f_op->fallocate(file, mode, offset, len); in shm_fallocate()
656 struct shm_file_data *sfd = shm_file_data(file); in shm_get_unmapped_area() local
658 return sfd->file->f_op->get_unmapped_area(sfd->file, addr, len, in shm_get_unmapped_area()
1537 struct shm_file_data *sfd; in do_shmat() local
1627 sfd = kzalloc(sizeof(*sfd), GFP_KERNEL); in do_shmat()
1628 if (!sfd) { in do_shmat()
1639 kfree(sfd); in do_shmat()
1644 sfd->id = shp->shm_perm.id; in do_shmat()
1645 sfd->ns = get_ipc_ns(ns); in do_shmat()
1646 sfd->file = base; in do_shmat()
1647 sfd->vm_ops = NULL; in do_shmat()
1648 file->private_data = sfd; in do_shmat()