Merge tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 'struct fd' updates from Al Viro: "Just the 'struct fd' layout change, with conversion to accessor helpers" * tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: add struct fd constructors, get rid of __to_fd() struct fd: representation change introduce fd_file(), convert all accessors to it.
This commit is contained in:
+3
-3
@@ -328,12 +328,12 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||
seqcount_spinlock_init(&irqfd->irq_entry_sc, &kvm->irqfds.lock);
|
||||
|
||||
f = fdget(args->fd);
|
||||
if (!f.file) {
|
||||
if (!fd_file(f)) {
|
||||
ret = -EBADF;
|
||||
goto out;
|
||||
}
|
||||
|
||||
eventfd = eventfd_ctx_fileget(f.file);
|
||||
eventfd = eventfd_ctx_fileget(fd_file(f));
|
||||
if (IS_ERR(eventfd)) {
|
||||
ret = PTR_ERR(eventfd);
|
||||
goto fail;
|
||||
@@ -420,7 +420,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||
* Check if there was an event already pending on the eventfd
|
||||
* before we registered, and trigger it as if we didn't miss it.
|
||||
*/
|
||||
events = vfs_poll(f.file, &irqfd->pt);
|
||||
events = vfs_poll(fd_file(f), &irqfd->pt);
|
||||
|
||||
if (events & EPOLLIN)
|
||||
schedule_work(&irqfd->inject);
|
||||
|
||||
+4
-4
@@ -194,7 +194,7 @@ static int kvm_vfio_file_del(struct kvm_device *dev, unsigned int fd)
|
||||
int ret;
|
||||
|
||||
f = fdget(fd);
|
||||
if (!f.file)
|
||||
if (!fd_file(f))
|
||||
return -EBADF;
|
||||
|
||||
ret = -ENOENT;
|
||||
@@ -202,7 +202,7 @@ static int kvm_vfio_file_del(struct kvm_device *dev, unsigned int fd)
|
||||
mutex_lock(&kv->lock);
|
||||
|
||||
list_for_each_entry(kvf, &kv->file_list, node) {
|
||||
if (kvf->file != f.file)
|
||||
if (kvf->file != fd_file(f))
|
||||
continue;
|
||||
|
||||
list_del(&kvf->node);
|
||||
@@ -240,7 +240,7 @@ static int kvm_vfio_file_set_spapr_tce(struct kvm_device *dev,
|
||||
return -EFAULT;
|
||||
|
||||
f = fdget(param.groupfd);
|
||||
if (!f.file)
|
||||
if (!fd_file(f))
|
||||
return -EBADF;
|
||||
|
||||
ret = -ENOENT;
|
||||
@@ -248,7 +248,7 @@ static int kvm_vfio_file_set_spapr_tce(struct kvm_device *dev,
|
||||
mutex_lock(&kv->lock);
|
||||
|
||||
list_for_each_entry(kvf, &kv->file_list, node) {
|
||||
if (kvf->file != f.file)
|
||||
if (kvf->file != fd_file(f))
|
||||
continue;
|
||||
|
||||
if (!kvf->iommu_group) {
|
||||
|
||||
Reference in New Issue
Block a user