Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: unify struct io_symlink and io_hardlink

They are really just a subset of each other, just use the one type.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+7 -20
+7 -20
io_uring/io_uring.c
··· 761 761 struct filename *filename; 762 762 }; 763 763 764 - struct io_symlink { 765 - struct file *file; 766 - int new_dfd; 767 - struct filename *oldpath; 768 - struct filename *newpath; 769 - }; 770 - 771 - struct io_hardlink { 764 + struct io_link { 772 765 struct file *file; 773 766 int old_dfd; 774 767 int new_dfd; ··· 4716 4723 static int io_symlinkat_prep(struct io_kiocb *req, 4717 4724 const struct io_uring_sqe *sqe) 4718 4725 { 4719 - struct io_symlink *sl = io_kiocb_to_cmd(req); 4726 + struct io_link *sl = io_kiocb_to_cmd(req); 4720 4727 const char __user *oldpath, *newpath; 4721 4728 4722 4729 if (sqe->len || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) ··· 4744 4751 4745 4752 static int io_symlinkat(struct io_kiocb *req, unsigned int issue_flags) 4746 4753 { 4747 - struct io_symlink *sl = io_kiocb_to_cmd(req); 4754 + struct io_link *sl = io_kiocb_to_cmd(req); 4748 4755 int ret; 4749 4756 4750 4757 if (issue_flags & IO_URING_F_NONBLOCK) ··· 4760 4767 static int io_linkat_prep(struct io_kiocb *req, 4761 4768 const struct io_uring_sqe *sqe) 4762 4769 { 4763 - struct io_hardlink *lnk = io_kiocb_to_cmd(req); 4770 + struct io_link *lnk = io_kiocb_to_cmd(req); 4764 4771 const char __user *oldf, *newf; 4765 4772 4766 4773 if (sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) ··· 4790 4797 4791 4798 static int io_linkat(struct io_kiocb *req, unsigned int issue_flags) 4792 4799 { 4793 - struct io_hardlink *lnk = io_kiocb_to_cmd(req); 4800 + struct io_link *lnk = io_kiocb_to_cmd(req); 4794 4801 int ret; 4795 4802 4796 4803 if (issue_flags & IO_URING_F_NONBLOCK) ··· 8004 8011 putname(md->filename); 8005 8012 break; 8006 8013 } 8007 - case IORING_OP_SYMLINKAT: { 8008 - struct io_symlink *sl = io_kiocb_to_cmd(req); 8009 - 8010 - putname(sl->oldpath); 8011 - putname(sl->newpath); 8012 - break; 8013 - } 8014 + case IORING_OP_SYMLINKAT: 8014 8015 case IORING_OP_LINKAT: { 8015 - struct io_hardlink *hl = io_kiocb_to_cmd(req); 8016 + struct io_link *hl = io_kiocb_to_cmd(req); 8016 8017 8017 8018 putname(hl->oldpath); 8018 8019 putname(hl->newpath);