Searched refs:fd_prot (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/drivers/target/
H A Dtarget_core_file.c261 static int fd_do_prot_rw(struct se_cmd *cmd, struct fd_prot *fd_prot, fd_do_prot_rw() argument
276 fd_prot->prot_buf = kzalloc(prot_size, GFP_KERNEL); fd_do_prot_rw()
277 if (!fd_prot->prot_buf) { fd_do_prot_rw()
278 pr_err("Unable to allocate fd_prot->prot_buf\n"); fd_do_prot_rw()
281 buf = fd_prot->prot_buf; fd_do_prot_rw()
283 fd_prot->prot_sg_nents = 1; fd_do_prot_rw()
284 fd_prot->prot_sg = kzalloc(sizeof(struct scatterlist), fd_do_prot_rw()
286 if (!fd_prot->prot_sg) { fd_do_prot_rw()
287 pr_err("Unable to allocate fd_prot->prot_sg\n"); fd_do_prot_rw()
288 kfree(fd_prot->prot_buf); fd_do_prot_rw()
291 sg_init_table(fd_prot->prot_sg, fd_prot->prot_sg_nents); fd_do_prot_rw()
292 sg_set_buf(fd_prot->prot_sg, buf, prot_size); fd_do_prot_rw()
296 rc = kernel_write(prot_fd, fd_prot->prot_buf, prot_size, pos); fd_do_prot_rw()
303 rc = kernel_read(prot_fd, pos, fd_prot->prot_buf, prot_size); fd_do_prot_rw()
312 kfree(fd_prot->prot_sg); fd_do_prot_rw()
313 kfree(fd_prot->prot_buf); fd_do_prot_rw()
615 struct fd_prot fd_prot; fd_execute_rw() local
633 memset(&fd_prot, 0, sizeof(struct fd_prot)); fd_execute_rw()
636 ret = fd_do_prot_rw(cmd, &fd_prot, false); fd_execute_rw()
647 0, fd_prot.prot_sg, 0); fd_execute_rw()
649 kfree(fd_prot.prot_sg); fd_execute_rw()
650 kfree(fd_prot.prot_buf); fd_execute_rw()
653 kfree(fd_prot.prot_sg); fd_execute_rw()
654 kfree(fd_prot.prot_buf); fd_execute_rw()
657 memset(&fd_prot, 0, sizeof(struct fd_prot)); fd_execute_rw()
662 ret = fd_do_prot_rw(cmd, &fd_prot, false); fd_execute_rw()
667 0, fd_prot.prot_sg, 0); fd_execute_rw()
669 kfree(fd_prot.prot_sg); fd_execute_rw()
670 kfree(fd_prot.prot_buf); fd_execute_rw()
698 ret = fd_do_prot_rw(cmd, &fd_prot, true); fd_execute_rw()
705 kfree(fd_prot.prot_sg); fd_execute_rw()
706 kfree(fd_prot.prot_buf); fd_execute_rw()
H A Dtarget_core_file.h24 struct fd_prot { struct

Completed in 43 milliseconds