Lines Matching refs:karg
3869 static int nfs_svc32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_svc32_trans() argument
3873 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_svc32_trans()
3874 err |= __get_user(karg->ca_svc.svc_port, &arg32->ca32_svc.svc32_port); in nfs_svc32_trans()
3875 err |= __get_user(karg->ca_svc.svc_nthreads, &arg32->ca32_svc.svc32_nthreads); in nfs_svc32_trans()
3879 static int nfs_clnt32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_clnt32_trans() argument
3883 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_clnt32_trans()
3884 err |= copy_from_user(&karg->ca_client.cl_ident[0], in nfs_clnt32_trans()
3887 err |= __get_user(karg->ca_client.cl_naddr, &arg32->ca32_client.cl32_naddr); in nfs_clnt32_trans()
3888 err |= copy_from_user(&karg->ca_client.cl_addrlist[0], in nfs_clnt32_trans()
3891 err |= __get_user(karg->ca_client.cl_fhkeytype, in nfs_clnt32_trans()
3893 err |= __get_user(karg->ca_client.cl_fhkeylen, in nfs_clnt32_trans()
3895 err |= copy_from_user(&karg->ca_client.cl_fhkey[0], in nfs_clnt32_trans()
3901 static int nfs_exp32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_exp32_trans() argument
3905 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_exp32_trans()
3906 err |= copy_from_user(&karg->ca_export.ex_client[0], in nfs_exp32_trans()
3909 err |= copy_from_user(&karg->ca_export.ex_path[0], in nfs_exp32_trans()
3912 err |= __get_user(karg->ca_export.ex_dev, in nfs_exp32_trans()
3914 err |= __get_user(karg->ca_export.ex_ino, in nfs_exp32_trans()
3916 err |= __get_user(karg->ca_export.ex_flags, in nfs_exp32_trans()
3918 err |= __get_user(karg->ca_export.ex_anon_uid, in nfs_exp32_trans()
3920 err |= __get_user(karg->ca_export.ex_anon_gid, in nfs_exp32_trans()
3922 karg->ca_export.ex_anon_uid = high2lowuid(karg->ca_export.ex_anon_uid); in nfs_exp32_trans()
3923 karg->ca_export.ex_anon_gid = high2lowgid(karg->ca_export.ex_anon_gid); in nfs_exp32_trans()
3927 static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_uud32_trans() argument
3933 memset(karg, 0, sizeof(*karg)); in nfs_uud32_trans()
3934 if(__get_user(karg->ca_version, &arg32->ca32_version)) in nfs_uud32_trans()
3936 karg->ca_umap.ug_ident = (char *)get_free_page(GFP_USER); in nfs_uud32_trans()
3937 if(!karg->ca_umap.ug_ident) in nfs_uud32_trans()
3940 if(strncpy_from_user(karg->ca_umap.ug_ident, in nfs_uud32_trans()
3943 err |= __get_user(karg->ca_umap.ug_uidbase, in nfs_uud32_trans()
3945 err |= __get_user(karg->ca_umap.ug_uidlen, in nfs_uud32_trans()
3950 karg->ca_umap.ug_udimap = kmalloc((sizeof(uid_t) * karg->ca_umap.ug_uidlen), in nfs_uud32_trans()
3952 if(!karg->ca_umap.ug_udimap) in nfs_uud32_trans()
3954 for(i = 0; i < karg->ca_umap.ug_uidlen; i++) in nfs_uud32_trans()
3955 err |= __get_user(karg->ca_umap.ug_udimap[i], in nfs_uud32_trans()
3957 err |= __get_user(karg->ca_umap.ug_gidbase, in nfs_uud32_trans()
3959 err |= __get_user(karg->ca_umap.ug_uidlen, in nfs_uud32_trans()
3964 karg->ca_umap.ug_gdimap = kmalloc((sizeof(gid_t) * karg->ca_umap.ug_uidlen), in nfs_uud32_trans()
3966 if(!karg->ca_umap.ug_gdimap) in nfs_uud32_trans()
3968 for(i = 0; i < karg->ca_umap.ug_gidlen; i++) in nfs_uud32_trans()
3969 err |= __get_user(karg->ca_umap.ug_gdimap[i], in nfs_uud32_trans()
3975 static int nfs_getfh32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_getfh32_trans() argument
3979 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_getfh32_trans()
3980 err |= copy_from_user(&karg->ca_getfh.gf_addr, in nfs_getfh32_trans()
3983 err |= __get_user(karg->ca_getfh.gf_dev, in nfs_getfh32_trans()
3985 err |= __get_user(karg->ca_getfh.gf_ino, in nfs_getfh32_trans()
3987 err |= __get_user(karg->ca_getfh.gf_version, in nfs_getfh32_trans()
3992 static int nfs_getfd32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_getfd32_trans() argument
3996 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_getfd32_trans()
3997 err |= copy_from_user(&karg->ca_getfd.gd_addr, in nfs_getfd32_trans()
4000 err |= copy_from_user(&karg->ca_getfd.gd_path, in nfs_getfd32_trans()
4003 err |= __get_user(karg->ca_getfd.gd_version, in nfs_getfd32_trans()
4008 static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32) in nfs_getfs32_trans() argument
4012 err = __get_user(karg->ca_version, &arg32->ca32_version); in nfs_getfs32_trans()
4013 err |= copy_from_user(&karg->ca_getfs.gd_addr, in nfs_getfs32_trans()
4016 err |= copy_from_user(&karg->ca_getfs.gd_path, in nfs_getfs32_trans()
4019 err |= __get_user(karg->ca_getfs.gd_maxlen, in nfs_getfs32_trans()
4034 struct nfsctl_arg *karg = NULL; in sys32_nfsservctl() local
4039 karg = kmalloc(sizeof(*karg), GFP_USER); in sys32_nfsservctl()
4040 if(!karg) in sys32_nfsservctl()
4045 kfree(karg); in sys32_nfsservctl()
4051 err = nfs_svc32_trans(karg, arg32); in sys32_nfsservctl()
4054 err = nfs_clnt32_trans(karg, arg32); in sys32_nfsservctl()
4057 err = nfs_clnt32_trans(karg, arg32); in sys32_nfsservctl()
4061 err = nfs_exp32_trans(karg, arg32); in sys32_nfsservctl()
4065 err = nfs_uud32_trans(karg, arg32); in sys32_nfsservctl()
4068 err = nfs_getfh32_trans(karg, arg32); in sys32_nfsservctl()
4071 err = nfs_getfd32_trans(karg, arg32); in sys32_nfsservctl()
4074 err = nfs_getfs32_trans(karg, arg32); in sys32_nfsservctl()
4084 err = sys_nfsservctl(cmd, karg, kres); in sys32_nfsservctl()
4096 if(karg) { in sys32_nfsservctl()
4098 if(karg->ca_umap.ug_ident) in sys32_nfsservctl()
4099 kfree(karg->ca_umap.ug_ident); in sys32_nfsservctl()
4100 if(karg->ca_umap.ug_udimap) in sys32_nfsservctl()
4101 kfree(karg->ca_umap.ug_udimap); in sys32_nfsservctl()
4102 if(karg->ca_umap.ug_gdimap) in sys32_nfsservctl()
4103 kfree(karg->ca_umap.ug_gdimap); in sys32_nfsservctl()
4105 kfree(karg); in sys32_nfsservctl()