Skip to content

Commit

Permalink
Merge tag 'vfs-6.8.misc' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/vfs/vfs

Pull misc vfs updates from Christian Brauner:
 "This contains the usual miscellaneous features, cleanups, and fixes
  for vfs and individual fses.

  Features:

   - Add Jan Kara as VFS reviewer

   - Show correct device and inode numbers in proc/<pid>/maps for vma
     files on stacked filesystems. This is now easily doable thanks to
     the backing file work from the last cycles. This comes with
     selftests

  Cleanups:

   - Remove a redundant might_sleep() from wait_on_inode()

   - Initialize pointer with NULL, not 0

   - Clarify comment on access_override_creds()

   - Rework and simplify eventfd_signal() and eventfd_signal_mask()
     helpers

   - Process aio completions in batches to avoid needless wakeups

   - Completely decouple struct mnt_idmap from namespaces. We now only
     keep the actual idmapping around and don't stash references to
     namespaces

   - Reformat maintainer entries to indicate that a given subsystem
     belongs to fs/

   - Simplify fput() for files that were never opened

   - Get rid of various pointless file helpers

   - Rename various file helpers

   - Rename struct file members after SLAB_TYPESAFE_BY_RCU switch from
     last cycle

   - Make relatime_need_update() return bool

   - Use GFP_KERNEL instead of GFP_USER when allocating superblocks

   - Replace deprecated ida_simple_*() calls with their current ida_*()
     counterparts

  Fixes:

   - Fix comments on user namespace id mapping helpers. They aren't
     kernel doc comments so they shouldn't be using /**

   - s/Retuns/Returns/g in various places

   - Add missing parameter documentation on can_move_mount_beneath()

   - Rename i_mapping->private_data to i_mapping->i_private_data

   - Fix a false-positive lockdep warning in pipe_write() for watch
     queues

   - Improve __fget_files_rcu() code generation to improve performance

   - Only notify writer that pipe resizing has finished after setting
     pipe->max_usage otherwise writers are never notified that the pipe
     has been resized and hang

   - Fix some kernel docs in hfsplus

   - s/passs/pass/g in various places

   - Fix kernel docs in ntfs

   - Fix kcalloc() arguments order reported by gcc 14

   - Fix uninitialized value in reiserfs"

* tag 'vfs-6.8.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (36 commits)
  reiserfs: fix uninit-value in comp_keys
  watch_queue: fix kcalloc() arguments order
  ntfs: dir.c: fix kernel-doc function parameter warnings
  fs: fix doc comment typo fs tree wide
  selftests/overlayfs: verify device and inode numbers in /proc/pid/maps
  fs/proc: show correct device and inode numbers in /proc/pid/maps
  eventfd: Remove usage of the deprecated ida_simple_xx() API
  fs: super: use GFP_KERNEL instead of GFP_USER for super block allocation
  fs/hfsplus: wrapper.c: fix kernel-doc warnings
  fs: add Jan Kara as reviewer
  fs/inode: Make relatime_need_update return bool
  pipe: wakeup wr_wait after setting max_usage
  file: remove __receive_fd()
  file: stop exposing receive_fd_user()
  fs: replace f_rcuhead with f_task_work
  file: remove pointless wrapper
  file: s/close_fd_get_file()/file_close_fd()/g
  Improve __fget_files_rcu() code generation (and thus __fget_light())
  file: massage cleanup of files that failed to open
  fs/pipe: Fix lockdep false-positive in watchqueue pipe_write()
  ...
  • Loading branch information
torvalds committed Jan 8, 2024
2 parents 1ab33c0 + dd8f87f commit c604110
Show file tree
Hide file tree
Showing 83 changed files with 784 additions and 456 deletions.
21 changes: 11 additions & 10 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8103,6 +8103,7 @@ F: include/trace/events/fs_dax.h
FILESYSTEMS (VFS and infrastructure)
M: Alexander Viro <[email protected]>
M: Christian Brauner <[email protected]>
R: Jan Kara <[email protected]>
L: [email protected]
S: Maintained
F: fs/*
Expand All @@ -8123,6 +8124,16 @@ F: fs/exportfs/
F: fs/fhandle.c
F: include/linux/exportfs.h

FILESYSTEMS [IDMAPPED MOUNTS]
M: Christian Brauner <[email protected]>
M: Seth Forshee <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/filesystems/idmappings.rst
F: fs/mnt_idmapping.c
F: include/linux/mnt_idmapping.*
F: tools/testing/selftests/mount_setattr/

FILESYSTEMS [IOMAP]
M: Christian Brauner <[email protected]>
R: Darrick J. Wong <[email protected]>
Expand Down Expand Up @@ -10202,16 +10213,6 @@ S: Maintained
W: https://github.com/o2genum/ideapad-slidebar
F: drivers/input/misc/ideapad_slidebar.c

IDMAPPED MOUNTS
M: Christian Brauner <[email protected]>
M: Seth Forshee <[email protected]>
L: [email protected]
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
F: Documentation/filesystems/idmappings.rst
F: include/linux/mnt_idmapping.*
F: tools/testing/selftests/mount_setattr/

IDT VersaClock 5 CLOCK DRIVER
M: Luca Ceresoli <[email protected]>
S: Maintained
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/hyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,7 @@ static u16 kvm_hvcall_signal_event(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *h
if (!eventfd)
return HV_STATUS_INVALID_PORT_ID;

eventfd_signal(eventfd, 1);
eventfd_signal(eventfd);
return HV_STATUS_SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ static bool kvm_xen_hcall_evtchn_send(struct kvm_vcpu *vcpu, u64 param, u64 *r)
if (ret < 0 && ret != -ENOTCONN)
return false;
} else {
eventfd_signal(evtchnfd->deliver.eventfd.ctx, 1);
eventfd_signal(evtchnfd->deliver.eventfd.ctx);
}

*r = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/accel/habanalabs/common/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,7 +2044,7 @@ static void hl_notifier_event_send(struct hl_notifier_event *notifier_event, u64
notifier_event->events_mask |= event_mask;

if (notifier_event->eventfd)
eventfd_signal(notifier_event->eventfd, 1);
eventfd_signal(notifier_event->eventfd);

mutex_unlock(&notifier_event->lock);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ static void binder_deferred_fd_close(int fd)
if (!twcb)
return;
init_task_work(&twcb->twork, binder_do_fd_close);
twcb->file = close_fd_get_file(fd);
twcb->file = file_close_fd(fd);
if (twcb->file) {
// pin it until binder_do_fd_close(); see comments there
get_file(twcb->file);
Expand Down
2 changes: 1 addition & 1 deletion drivers/fpga/dfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ static irqreturn_t dfl_irq_handler(int irq, void *arg)
{
struct eventfd_ctx *trigger = arg;

eventfd_signal(trigger, 1);
eventfd_signal(trigger);
return IRQ_HANDLED;
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_syncobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ static void syncobj_eventfd_entry_fence_func(struct dma_fence *fence,
struct syncobj_eventfd_entry *entry =
container_of(cb, struct syncobj_eventfd_entry, fence_cb);

eventfd_signal(entry->ev_fd_ctx, 1);
eventfd_signal(entry->ev_fd_ctx);
syncobj_eventfd_entry_free(entry);
}

Expand All @@ -1388,13 +1388,13 @@ syncobj_eventfd_entry_func(struct drm_syncobj *syncobj,
entry->fence = fence;

if (entry->flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) {
eventfd_signal(entry->ev_fd_ctx, 1);
eventfd_signal(entry->ev_fd_ctx);
syncobj_eventfd_entry_free(entry);
} else {
ret = dma_fence_add_callback(fence, &entry->fence_cb,
syncobj_eventfd_entry_fence_func);
if (ret == -ENOENT) {
eventfd_signal(entry->ev_fd_ctx, 1);
eventfd_signal(entry->ev_fd_ctx);
syncobj_eventfd_entry_free(entry);
}
}
Expand Down
13 changes: 6 additions & 7 deletions drivers/gpu/drm/i915/gvt/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void init_irq_map(struct intel_gvt_irq *irq)
#define MSI_CAP_DATA(offset) (offset + 8)
#define MSI_CAP_EN 0x1

static int inject_virtual_interrupt(struct intel_vgpu *vgpu)
static void inject_virtual_interrupt(struct intel_vgpu *vgpu)
{
unsigned long offset = vgpu->gvt->device_info.msi_cap_offset;
u16 control, data;
Expand All @@ -434,10 +434,10 @@ static int inject_virtual_interrupt(struct intel_vgpu *vgpu)

/* Do not generate MSI if MSIEN is disabled */
if (!(control & MSI_CAP_EN))
return 0;
return;

if (WARN(control & GENMASK(15, 1), "only support one MSI format\n"))
return -EINVAL;
return;

trace_inject_msi(vgpu->id, addr, data);

Expand All @@ -451,10 +451,9 @@ static int inject_virtual_interrupt(struct intel_vgpu *vgpu)
* returned and don't inject interrupt into guest.
*/
if (!test_bit(INTEL_VGPU_STATUS_ATTACHED, vgpu->status))
return -ESRCH;
if (vgpu->msi_trigger && eventfd_signal(vgpu->msi_trigger, 1) != 1)
return -EFAULT;
return 0;
return;
if (vgpu->msi_trigger)
eventfd_signal(vgpu->msi_trigger);
}

static void propagate_event(struct intel_gvt_irq *irq,
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mlx5/devx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,7 @@ static void dispatch_event_fd(struct list_head *fd_list,

list_for_each_entry_rcu(item, fd_list, xa_list) {
if (item->eventfd)
eventfd_signal(item->eventfd, 1);
eventfd_signal(item->eventfd);
else
deliver_event(item, data);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/ocxl/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static irqreturn_t irq_handler(void *private)
{
struct eventfd_ctx *ev_ctx = private;

eventfd_signal(ev_ctx, 1);
eventfd_signal(ev_ctx);
return IRQ_HANDLED;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/cio/vfio_ccw_chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static ssize_t vfio_ccw_crw_region_read(struct vfio_ccw_private *private,

/* Notify the guest if more CRWs are on our queue */
if (!list_empty(&private->crw) && private->crw_trigger)
eventfd_signal(private->crw_trigger, 1);
eventfd_signal(private->crw_trigger);

return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/s390/cio/vfio_ccw_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void vfio_ccw_sch_io_todo(struct work_struct *work)
private->state = VFIO_CCW_STATE_IDLE;

if (private->io_trigger)
eventfd_signal(private->io_trigger, 1);
eventfd_signal(private->io_trigger);
}

void vfio_ccw_crw_todo(struct work_struct *work)
Expand All @@ -122,7 +122,7 @@ void vfio_ccw_crw_todo(struct work_struct *work)
private = container_of(work, struct vfio_ccw_private, crw_work);

if (!list_empty(&private->crw) && private->crw_trigger)
eventfd_signal(private->crw_trigger, 1);
eventfd_signal(private->crw_trigger);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/s390/cio/vfio_ccw_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static int vfio_ccw_mdev_set_irqs(struct vfio_ccw_private *private,
case VFIO_IRQ_SET_DATA_NONE:
{
if (*ctx)
eventfd_signal(*ctx, 1);
eventfd_signal(*ctx);
return 0;
}
case VFIO_IRQ_SET_DATA_BOOL:
Expand All @@ -432,7 +432,7 @@ static int vfio_ccw_mdev_set_irqs(struct vfio_ccw_private *private,
return -EFAULT;

if (trigger && *ctx)
eventfd_signal(*ctx, 1);
eventfd_signal(*ctx);
return 0;
}
case VFIO_IRQ_SET_DATA_EVENTFD:
Expand Down Expand Up @@ -612,7 +612,7 @@ static void vfio_ccw_mdev_request(struct vfio_device *vdev, unsigned int count)
"Relaying device request to user (#%u)\n",
count);

eventfd_signal(private->req_trigger, 1);
eventfd_signal(private->req_trigger);
} else if (count == 0) {
dev_notice(dev,
"No device request channel registered, blocked until released by user\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/crypto/vfio_ap_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ static void vfio_ap_mdev_request(struct vfio_device *vdev, unsigned int count)
"Relaying device request to user (#%u)\n",
count);

eventfd_signal(matrix_mdev->req_trigger, 1);
eventfd_signal(matrix_mdev->req_trigger);
} else if (count == 0) {
dev_notice(dev,
"No device request registered, blocked until released by user\n");
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/function/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ static void ffs_user_copy_worker(struct work_struct *work)
io_data->kiocb->ki_complete(io_data->kiocb, ret);

if (io_data->ffs->ffs_eventfd && !kiocb_has_eventfd)
eventfd_signal(io_data->ffs->ffs_eventfd, 1);
eventfd_signal(io_data->ffs->ffs_eventfd);

if (io_data->read)
kfree(io_data->to_free);
Expand Down Expand Up @@ -2738,7 +2738,7 @@ static void __ffs_event_add(struct ffs_data *ffs,
ffs->ev.types[ffs->ev.count++] = type;
wake_up_locked(&ffs->ev.waitq);
if (ffs->ffs_eventfd)
eventfd_signal(ffs->ffs_eventfd, 1);
eventfd_signal(ffs->ffs_eventfd);
}

static void ffs_event_add(struct ffs_data *ffs,
Expand Down
8 changes: 4 additions & 4 deletions drivers/vdpa/vdpa_user/vduse_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static void vduse_vq_kick(struct vduse_virtqueue *vq)
goto unlock;

if (vq->kickfd)
eventfd_signal(vq->kickfd, 1);
eventfd_signal(vq->kickfd);
else
vq->kicked = true;
unlock:
Expand Down Expand Up @@ -911,7 +911,7 @@ static int vduse_kickfd_setup(struct vduse_dev *dev,
eventfd_ctx_put(vq->kickfd);
vq->kickfd = ctx;
if (vq->ready && vq->kicked && vq->kickfd) {
eventfd_signal(vq->kickfd, 1);
eventfd_signal(vq->kickfd);
vq->kicked = false;
}
spin_unlock(&vq->kick_lock);
Expand Down Expand Up @@ -960,7 +960,7 @@ static bool vduse_vq_signal_irqfd(struct vduse_virtqueue *vq)

spin_lock_irq(&vq->irq_lock);
if (vq->ready && vq->cb.trigger) {
eventfd_signal(vq->cb.trigger, 1);
eventfd_signal(vq->cb.trigger);
signal = true;
}
spin_unlock_irq(&vq->irq_lock);
Expand Down Expand Up @@ -1157,7 +1157,7 @@ static long vduse_dev_ioctl(struct file *file, unsigned int cmd,
fput(f);
break;
}
ret = receive_fd(f, perm_to_file_flags(entry.perm));
ret = receive_fd(f, NULL, perm_to_file_flags(entry.perm));
fput(f);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static irqreturn_t vfio_fsl_mc_irq_handler(int irq_num, void *arg)
{
struct vfio_fsl_mc_irq *mc_irq = (struct vfio_fsl_mc_irq *)arg;

eventfd_signal(mc_irq->trigger, 1);
eventfd_signal(mc_irq->trigger);
return IRQ_HANDLED;
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/vfio/pci/vfio_pci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static int vfio_pci_core_runtime_resume(struct device *dev)
*/
down_write(&vdev->memory_lock);
if (vdev->pm_wake_eventfd_ctx) {
eventfd_signal(vdev->pm_wake_eventfd_ctx, 1);
eventfd_signal(vdev->pm_wake_eventfd_ctx);
__vfio_pci_runtime_pm_exit(vdev);
}
up_write(&vdev->memory_lock);
Expand Down Expand Up @@ -1883,7 +1883,7 @@ void vfio_pci_core_request(struct vfio_device *core_vdev, unsigned int count)
pci_notice_ratelimited(pdev,
"Relaying device request to user (#%u)\n",
count);
eventfd_signal(vdev->req_trigger, 1);
eventfd_signal(vdev->req_trigger);
} else if (count == 0) {
pci_warn(pdev,
"No device request channel registered, blocked until released by user\n");
Expand Down Expand Up @@ -2302,7 +2302,7 @@ pci_ers_result_t vfio_pci_core_aer_err_detected(struct pci_dev *pdev,
mutex_lock(&vdev->igate);

if (vdev->err_trigger)
eventfd_signal(vdev->err_trigger, 1);
eventfd_signal(vdev->err_trigger);

mutex_unlock(&vdev->igate);

Expand Down
12 changes: 6 additions & 6 deletions drivers/vfio/pci/vfio_pci_intrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void vfio_send_intx_eventfd(void *opaque, void *unused)
ctx = vfio_irq_ctx_get(vdev, 0);
if (WARN_ON_ONCE(!ctx))
return;
eventfd_signal(ctx->trigger, 1);
eventfd_signal(ctx->trigger);
}
}

Expand Down Expand Up @@ -342,7 +342,7 @@ static irqreturn_t vfio_msihandler(int irq, void *arg)
{
struct eventfd_ctx *trigger = arg;

eventfd_signal(trigger, 1);
eventfd_signal(trigger);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -689,11 +689,11 @@ static int vfio_pci_set_msi_trigger(struct vfio_pci_core_device *vdev,
if (!ctx)
continue;
if (flags & VFIO_IRQ_SET_DATA_NONE) {
eventfd_signal(ctx->trigger, 1);
eventfd_signal(ctx->trigger);
} else if (flags & VFIO_IRQ_SET_DATA_BOOL) {
uint8_t *bools = data;
if (bools[i - start])
eventfd_signal(ctx->trigger, 1);
eventfd_signal(ctx->trigger);
}
}
return 0;
Expand All @@ -707,7 +707,7 @@ static int vfio_pci_set_ctx_trigger_single(struct eventfd_ctx **ctx,
if (flags & VFIO_IRQ_SET_DATA_NONE) {
if (*ctx) {
if (count) {
eventfd_signal(*ctx, 1);
eventfd_signal(*ctx);
} else {
eventfd_ctx_put(*ctx);
*ctx = NULL;
Expand All @@ -722,7 +722,7 @@ static int vfio_pci_set_ctx_trigger_single(struct eventfd_ctx **ctx,

trigger = *(uint8_t *)data;
if (trigger && *ctx)
eventfd_signal(*ctx, 1);
eventfd_signal(*ctx);

return 0;
} else if (flags & VFIO_IRQ_SET_DATA_EVENTFD) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/vfio/platform/vfio_platform_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static irqreturn_t vfio_automasked_irq_handler(int irq, void *dev_id)
spin_unlock_irqrestore(&irq_ctx->lock, flags);

if (ret == IRQ_HANDLED)
eventfd_signal(irq_ctx->trigger, 1);
eventfd_signal(irq_ctx->trigger);

return ret;
}
Expand All @@ -164,7 +164,7 @@ static irqreturn_t vfio_irq_handler(int irq, void *dev_id)
{
struct vfio_platform_irq *irq_ctx = dev_id;

eventfd_signal(irq_ctx->trigger, 1);
eventfd_signal(irq_ctx->trigger);

return IRQ_HANDLED;
}
Expand Down
Loading

0 comments on commit c604110

Please sign in to comment.