Skip to content

Commit

Permalink
[tree-wide] finally take no_llseek out
Browse files Browse the repository at this point in the history
no_llseek had been defined to NULL two years ago, in commit 868941b
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\<no_llseek\>/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Al Viro authored and torvalds committed Sep 27, 2024
1 parent 075dbe9 commit cb787f4
Show file tree
Hide file tree
Showing 221 changed files with 0 additions and 270 deletions.
1 change: 0 additions & 1 deletion Documentation/watchdog/convert_drivers_to_kernel_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Example conversion::

-static const struct file_operations s3c2410wdt_fops = {
- .owner = THIS_MODULE,
- .llseek = no_llseek,
- .write = s3c2410wdt_write,
- .unlocked_ioctl = s3c2410wdt_ioctl,
- .open = s3c2410wdt_open,
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}

static const struct file_operations perf_fops = {
.llseek = no_llseek,
.read = perf_read,
.write = perf_write,
.unlocked_ioctl = perf_ioctl,
Expand Down
1 change: 0 additions & 1 deletion arch/s390/hypfs/hypfs_dbfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ static long dbfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

static const struct file_operations dbfs_ops = {
.read = dbfs_read,
.llseek = no_llseek,
.unlocked_ioctl = dbfs_ioctl,
};

Expand Down
1 change: 0 additions & 1 deletion arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ static const struct file_operations hypfs_file_ops = {
.release = hypfs_release,
.read_iter = hypfs_read_iter,
.write_iter = hypfs_write_iter,
.llseek = no_llseek,
};

static struct file_system_type hypfs_type = {
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ static const struct file_operations debug_file_ops = {
.write = debug_input,
.open = debug_open,
.release = debug_close,
.llseek = no_llseek,
};

static struct dentry *debug_debugfs_root_entry;
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/perf_cpum_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,6 @@ static const struct file_operations cfset_fops = {
.release = cfset_release,
.unlocked_ioctl = cfset_ioctl,
.compat_ioctl = cfset_ioctl,
.llseek = no_llseek
};

static struct miscdevice cfset_dev = {
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ static const struct file_operations stsi_##fc##_##s1##_##s2##_fs_ops = { \
.open = stsi_open_##fc##_##s1##_##s2, \
.release = stsi_release, \
.read = stsi_read, \
.llseek = no_llseek, \
};

static int stsi_release(struct inode *inode, struct file *file)
Expand Down
1 change: 0 additions & 1 deletion arch/s390/pci/pci_clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ static const struct file_operations clp_misc_fops = {
.release = clp_misc_release,
.unlocked_ioctl = clp_misc_ioctl,
.compat_ioctl = clp_misc_ioctl,
.llseek = no_llseek,
};

static struct miscdevice clp_misc_device = {
Expand Down
1 change: 0 additions & 1 deletion arch/um/drivers/harddog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ static const struct file_operations harddog_fops = {
.compat_ioctl = compat_ptr_ioctl,
.open = harddog_open,
.release = harddog_release,
.llseek = no_llseek,
};

static struct miscdevice harddog_miscdev = {
Expand Down
2 changes: 0 additions & 2 deletions arch/um/drivers/hostaudio_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ static int hostmixer_release(struct inode *inode, struct file *file)

static const struct file_operations hostaudio_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = hostaudio_read,
.write = hostaudio_write,
.poll = hostaudio_poll,
Expand All @@ -304,7 +303,6 @@ static const struct file_operations hostaudio_fops = {

static const struct file_operations hostmixer_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.unlocked_ioctl = hostmixer_ioctl_mixdev,
.open = hostmixer_open_mixdev,
.release = hostmixer_release,
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/cpu/mce/dev-mcelog.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ static const struct file_operations mce_chrdev_ops = {
.poll = mce_chrdev_poll,
.unlocked_ioctl = mce_chrdev_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.llseek = no_llseek,
};

static struct miscdevice mce_chrdev_device = {
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/cpu/resctrl/pseudo_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,6 @@ static int pseudo_lock_dev_mmap(struct file *filp, struct vm_area_struct *vma)

static const struct file_operations pseudo_lock_dev_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = NULL,
.write = NULL,
.open = pseudo_lock_dev_open,
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/apei/erst-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ static const struct file_operations erst_dbg_ops = {
.read = erst_dbg_read,
.write = erst_dbg_write,
.unlocked_ioctl = erst_dbg_ioctl,
.llseek = no_llseek,
};

static struct miscdevice erst_dbg_dev = {
Expand Down
1 change: 0 additions & 1 deletion drivers/auxdisplay/charlcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ static const struct file_operations charlcd_fops = {
.write = charlcd_write,
.open = charlcd_open,
.release = charlcd_release,
.llseek = no_llseek,
};

static struct miscdevice charlcd_dev = {
Expand Down
2 changes: 0 additions & 2 deletions drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2259,14 +2259,12 @@ static const struct file_operations mtip_regs_fops = {
.owner = THIS_MODULE,
.open = simple_open,
.read = mtip_hw_read_registers,
.llseek = no_llseek,
};

static const struct file_operations mtip_flags_fops = {
.owner = THIS_MODULE,
.open = simple_open,
.read = mtip_hw_read_flags,
.llseek = no_llseek,
};

static void mtip_hw_debugfs_init(struct driver_data *dd)
Expand Down
1 change: 0 additions & 1 deletion drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2835,7 +2835,6 @@ static const struct file_operations pkt_ctl_fops = {
.compat_ioctl = pkt_ctl_compat_ioctl,
#endif
.owner = THIS_MODULE,
.llseek = no_llseek,
};

static struct miscdevice pkt_misc = {
Expand Down
1 change: 0 additions & 1 deletion drivers/block/ublk_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,6 @@ static const struct file_operations ublk_ch_fops = {
.owner = THIS_MODULE,
.open = ublk_ch_open,
.release = ublk_ch_release,
.llseek = no_llseek,
.read_iter = ublk_ch_read_iter,
.write_iter = ublk_ch_write_iter,
.uring_cmd = ublk_ch_uring_cmd,
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ static const struct file_operations vhci_fops = {
.poll = vhci_poll,
.open = vhci_open,
.release = vhci_release,
.llseek = no_llseek,
};

static struct miscdevice vhci_miscdev = {
Expand Down
2 changes: 0 additions & 2 deletions drivers/bus/moxtet.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@ static const struct file_operations input_fops = {
.owner = THIS_MODULE,
.open = moxtet_debug_open,
.read = input_read,
.llseek = no_llseek,
};

static ssize_t output_read(struct file *file, char __user *buf, size_t len,
Expand Down Expand Up @@ -549,7 +548,6 @@ static const struct file_operations output_fops = {
.open = moxtet_debug_open,
.read = output_read,
.write = output_write,
.llseek = no_llseek,
};

static int moxtet_register_debugfs(struct moxtet *moxtet)
Expand Down
1 change: 0 additions & 1 deletion drivers/char/applicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ static irqreturn_t ac_interrupt(int, void *);

static const struct file_operations ac_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = ac_read,
.write = ac_write,
.unlocked_ioctl = ac_ioctl,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ds1620.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ static const struct file_operations ds1620_fops = {
.open = ds1620_open,
.read = ds1620_read,
.unlocked_ioctl = ds1620_unlocked_ioctl,
.llseek = no_llseek,
};

static struct miscdevice ds1620_miscdev = {
Expand Down
1 change: 0 additions & 1 deletion drivers/char/dtlk.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static const struct file_operations dtlk_fops =
.unlocked_ioctl = dtlk_ioctl,
.open = dtlk_open,
.release = dtlk_release,
.llseek = no_llseek,
};

/* local prototypes */
Expand Down
1 change: 0 additions & 1 deletion drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ hpet_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

static const struct file_operations hpet_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = hpet_read,
.poll = hpet_poll,
.unlocked_ioctl = hpet_ioctl,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ static const struct file_operations ipmi_wdog_fops = {
.open = ipmi_open,
.release = ipmi_close,
.fasync = ipmi_fasync,
.llseek = no_llseek,
};

static struct miscdevice ipmi_wdog_miscdev = {
Expand Down
1 change: 0 additions & 1 deletion drivers/char/pc8736x_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ static const struct file_operations pc8736x_gpio_fileops = {
.open = pc8736x_gpio_open,
.write = nsc_gpio_write,
.read = nsc_gpio_read,
.llseek = no_llseek,
};

static void __init pc8736x_init_shadow(void)
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ static const struct class ppdev_class = {

static const struct file_operations pp_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = pp_read,
.write = pp_write,
.poll = pp_poll,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/scx200_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ static const struct file_operations scx200_gpio_fileops = {
.read = nsc_gpio_read,
.open = scx200_gpio_open,
.release = scx200_gpio_release,
.llseek = no_llseek,
};

static struct cdev scx200_gpio_cdev; /* use 1 cdev for all pins */
Expand Down
1 change: 0 additions & 1 deletion drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,6 @@ static const struct file_operations sonypi_misc_fops = {
.release = sonypi_misc_release,
.fasync = sonypi_misc_fasync,
.unlocked_ioctl = sonypi_misc_ioctl,
.llseek = no_llseek,
};

static struct miscdevice sonypi_misc_device = {
Expand Down
1 change: 0 additions & 1 deletion drivers/char/tpm/tpm-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static int tpm_release(struct inode *inode, struct file *file)

const struct file_operations tpm_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = tpm_open,
.read = tpm_common_read,
.write = tpm_common_write,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/tpm/tpm_vtpm_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ static int vtpm_proxy_fops_release(struct inode *inode, struct file *filp)

static const struct file_operations vtpm_proxy_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = vtpm_proxy_fops_read,
.write = vtpm_proxy_fops_write,
.poll = vtpm_proxy_fops_poll,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/tpm/tpmrm-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static int tpmrm_release(struct inode *inode, struct file *file)

const struct file_operations tpmrm_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = tpmrm_open,
.read = tpm_common_read,
.write = tpm_common_write,
Expand Down
1 change: 0 additions & 1 deletion drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,6 @@ static const struct file_operations port_fops = {
.poll = port_fops_poll,
.release = port_fops_release,
.fasync = port_fops_fasync,
.llseek = no_llseek,
};

/*
Expand Down
1 change: 0 additions & 1 deletion drivers/counter/counter-chrdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ static int counter_chrdev_release(struct inode *inode, struct file *filp)

static const struct file_operations counter_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = counter_chrdev_read,
.poll = counter_chrdev_poll,
.unlocked_ioctl = counter_chrdev_ioctl,
Expand Down
1 change: 0 additions & 1 deletion drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,6 @@ static __poll_t fw_device_op_poll(struct file *file, poll_table * pt)

const struct file_operations fw_device_ops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = fw_device_op_open,
.read = fw_device_op_read,
.unlocked_ioctl = fw_device_op_ioctl,
Expand Down
1 change: 0 additions & 1 deletion drivers/firmware/arm_scmi/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2886,7 +2886,6 @@ static ssize_t reset_all_on_write(struct file *filp, const char __user *buf,
static const struct file_operations fops_reset_counts = {
.owner = THIS_MODULE,
.open = simple_open,
.llseek = no_llseek,
.write = reset_all_on_write,
};

Expand Down
5 changes: 0 additions & 5 deletions drivers/firmware/arm_scmi/raw_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ static const struct file_operations scmi_dbg_raw_mode_reset_fops = {
.open = scmi_dbg_raw_mode_open,
.release = scmi_dbg_raw_mode_release,
.write = scmi_dbg_raw_mode_reset_write,
.llseek = no_llseek,
.owner = THIS_MODULE,
};

Expand All @@ -960,7 +959,6 @@ static const struct file_operations scmi_dbg_raw_mode_message_fops = {
.read = scmi_dbg_raw_mode_message_read,
.write = scmi_dbg_raw_mode_message_write,
.poll = scmi_dbg_raw_mode_message_poll,
.llseek = no_llseek,
.owner = THIS_MODULE,
};

Expand All @@ -977,7 +975,6 @@ static const struct file_operations scmi_dbg_raw_mode_message_async_fops = {
.read = scmi_dbg_raw_mode_message_read,
.write = scmi_dbg_raw_mode_message_async_write,
.poll = scmi_dbg_raw_mode_message_poll,
.llseek = no_llseek,
.owner = THIS_MODULE,
};

Expand All @@ -1001,7 +998,6 @@ static const struct file_operations scmi_dbg_raw_mode_notification_fops = {
.release = scmi_dbg_raw_mode_release,
.read = scmi_test_dbg_raw_mode_notif_read,
.poll = scmi_test_dbg_raw_mode_notif_poll,
.llseek = no_llseek,
.owner = THIS_MODULE,
};

Expand All @@ -1025,7 +1021,6 @@ static const struct file_operations scmi_dbg_raw_mode_errors_fops = {
.release = scmi_dbg_raw_mode_release,
.read = scmi_test_dbg_raw_mode_errors_read,
.poll = scmi_test_dbg_raw_mode_errors_poll,
.llseek = no_llseek,
.owner = THIS_MODULE,
};

Expand Down
1 change: 0 additions & 1 deletion drivers/firmware/efi/capsule-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ static const struct file_operations efi_capsule_fops = {
.open = efi_capsule_open,
.write = efi_capsule_write,
.release = efi_capsule_release,
.llseek = no_llseek,
};

static struct miscdevice efi_capsule_misc = {
Expand Down
1 change: 0 additions & 1 deletion drivers/firmware/efi/test/efi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ static const struct file_operations efi_test_fops = {
.unlocked_ioctl = efi_test_ioctl,
.open = efi_test_open,
.release = efi_test_close,
.llseek = no_llseek,
};

static struct miscdevice efi_test_dev = {
Expand Down
1 change: 0 additions & 1 deletion drivers/firmware/turris-mox-rwtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ static const struct file_operations do_sign_fops = {
.open = rwtm_debug_open,
.read = do_sign_read,
.write = do_sign_write,
.llseek = no_llseek,
};

static void rwtm_debugfs_release(void *root)
Expand Down
1 change: 0 additions & 1 deletion drivers/gnss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ static const struct file_operations gnss_fops = {
.read = gnss_read,
.write = gnss_write,
.poll = gnss_poll,
.llseek = no_llseek,
};

static struct class *gnss_class;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpio/gpio-mockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ static const struct file_operations gpio_mockup_debugfs_ops = {
.open = gpio_mockup_debugfs_open,
.read = gpio_mockup_debugfs_read,
.write = gpio_mockup_debugfs_write,
.llseek = no_llseek,
.release = single_release,
};

Expand Down
1 change: 0 additions & 1 deletion drivers/gpio/gpio-sloppy-logic-analyzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ static const struct file_operations fops_trigger = {
.owner = THIS_MODULE,
.open = trigger_open,
.write = trigger_write,
.llseek = no_llseek,
.release = single_release,
};

Expand Down
1 change: 0 additions & 1 deletion drivers/gpio/gpiolib-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,6 @@ static const struct file_operations gpio_fileops = {
.poll = lineinfo_watch_poll,
.read = lineinfo_watch_read,
.owner = THIS_MODULE,
.llseek = no_llseek,
.unlocked_ioctl = gpio_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = gpio_ioctl_compat,
Expand Down
Loading

0 comments on commit cb787f4

Please sign in to comment.