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.

Merge tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull CLASS(fd) update from Al Viro:
"A missing bit of commit 66635b077624 ("assorted variants of irqfd
setup: convert to CLASS(fd)") from a year ago.

mshv_eventfd would've been covered by that, but it had forked slightly
before that series and got merged into mainline later"

* tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
mshv_eventfd: convert to CLASS(fd)

+3 -11
+3 -11
drivers/hv/mshv_eventfd.c
··· 377 377 struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL; 378 378 struct mshv_irqfd *irqfd, *tmp; 379 379 unsigned int events; 380 - struct fd f; 381 380 int ret; 382 381 int idx; 382 + 383 + CLASS(fd, f)(args->fd); 383 384 384 385 irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL); 385 386 if (!irqfd) ··· 391 390 INIT_WORK(&irqfd->irqfd_shutdown, mshv_irqfd_shutdown); 392 391 seqcount_spinlock_init(&irqfd->irqfd_irqe_sc, &pt->pt_irqfds_lock); 393 392 394 - f = fdget(args->fd); 395 - if (!fd_file(f)) { 393 + if (fd_empty(f)) { 396 394 ret = -EBADF; 397 395 goto out; 398 396 } ··· 496 496 mshv_assert_irq_slow(irqfd); 497 497 498 498 srcu_read_unlock(&pt->pt_irq_srcu, idx); 499 - /* 500 - * do not drop the file until the irqfd is fully initialized, otherwise 501 - * we might race against the POLLHUP 502 - */ 503 - fdput(f); 504 - 505 499 return 0; 506 500 507 501 fail: ··· 507 513 508 514 if (eventfd && !IS_ERR(eventfd)) 509 515 eventfd_ctx_put(eventfd); 510 - 511 - fdput(f); 512 516 513 517 out: 514 518 kfree(irqfd);