Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/arnd/bkl

* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  vfs: make no_llseek the default
  vfs: don't use BKL in default_llseek
  llseek: automatically add .llseek fop
  libfs: use generic_file_llseek for simple_attr
  mac80211: disallow seeks in minstrel debug code
  lirc: make chardev nonseekable
  viotape: use noop_llseek
  raw: use explicit llseek file operations
  ibmasmfs: use generic_file_llseek
  spufs: use llseek in all file operations
  arm/omap: use generic_file_llseek in iommu_debug
  lkdtm: use generic_file_llseek in debugfs
  net/wireless: use generic_file_llseek in debugfs
  drm: use noop_llseek
  • Loading branch information
torvalds committed Oct 22, 2010
2 parents 79f14b7 + 776c163 commit 092e0e7
Show file tree
Hide file tree
Showing 370 changed files with 601 additions and 77 deletions.
1 change: 1 addition & 0 deletions Documentation/DocBook/drm.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
#ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl,
#endif
.llseek = noop_llseek,
},
.pci_driver = {
.name = DRIVER_NAME,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ static const struct file_operations etb_fops = {
.read = etb_read,
.open = etb_open,
.release = etb_release,
.llseek = no_llseek,
};

static struct miscdevice etb_miscdev = {
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-msm/last_radio_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ static ssize_t last_radio_log_read(struct file *file, char __user *buf,
}

static struct file_operations last_radio_log_fops = {
.read = last_radio_log_read
.read = last_radio_log_read,
.llseek = default_llseek,
};

void msm_init_last_radio_log(struct module *owner)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/smd_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ static int debug_open(struct inode *inode, struct file *file)
static const struct file_operations debug_ops = {
.read = debug_read,
.open = debug_open,
.llseek = default_llseek,
};

static void debug_create(const char *name, mode_t mode,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-mxc/audmux-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
static const struct file_operations audmux_debugfs_fops = {
.open = audmux_open_file,
.read = audmux_read_file,
.llseek = default_llseek,
};

static void audmux_debugfs_init(void)
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/plat-omap/iommu-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,14 @@ static int debug_open_generic(struct inode *inode, struct file *file)
.open = debug_open_generic, \
.read = debug_read_##name, \
.write = debug_write_##name, \
.llseek = generic_file_llseek, \
};

#define DEBUG_FOPS_RO(name) \
static const struct file_operations debug_##name##_fops = { \
.open = debug_open_generic, \
.read = debug_read_##name, \
.llseek = generic_file_llseek, \
};

DEBUG_FOPS_RO(ver);
Expand Down
1 change: 1 addition & 0 deletions arch/avr32/boards/mimc200/fram.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static int fram_mmap(struct file *filp, struct vm_area_struct *vma)
static const struct file_operations fram_fops = {
.owner = THIS_MODULE,
.mmap = fram_mmap,
.llseek = noop_llseek,
};

#define FRAM_MINOR 0
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/kernel/kgdb_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static const struct file_operations kgdb_test_proc_fops = {
.owner = THIS_MODULE,
.read = kgdb_test_proc_read,
.write = kgdb_test_proc_write,
.llseek = noop_llseek,
};

static int __init kgdbtest_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/mach-bf561/coreb.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static const struct file_operations coreb_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = coreb_ioctl,
.llseek = noop_llseek,
};

static struct miscdevice coreb_dev = {
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v10/drivers/ds1302.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ print_rtc_status(void)
static const struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = rtc_unlocked_ioctl,
.llseek = noop_llseek,
};

/* Probe for the chip by writing something to its RAM and try reading it back. */
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v10/drivers/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ static const struct file_operations gpio_fops = {
.write = gpio_write,
.open = gpio_open,
.release = gpio_release,
.llseek = noop_llseek,
};

static void ioif_watcher(const unsigned int gpio_in_available,
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v10/drivers/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ static const struct file_operations i2c_fops = {
.unlocked_ioctl = i2c_ioctl,
.open = i2c_open,
.release = i2c_release,
.llseek = noop_llseek,
};

int __init
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v10/drivers/pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static int voltage_low;
static const struct file_operations pcf8563_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = pcf8563_unlocked_ioctl,
.llseek = noop_llseek,
};

unsigned char
Expand Down
3 changes: 2 additions & 1 deletion arch/cris/arch-v10/drivers/sync_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ static const struct file_operations sync_serial_fops = {
.poll = sync_serial_poll,
.unlocked_ioctl = sync_serial_ioctl,
.open = sync_serial_open,
.release = sync_serial_release
.release = sync_serial_release,
.llseek = noop_llseek,
};

static int __init etrax_sync_serial_init(void)
Expand Down
3 changes: 2 additions & 1 deletion arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ const struct file_operations cryptocop_fops = {
.owner = THIS_MODULE,
.open = cryptocop_open,
.release = cryptocop_release,
.unlocked_ioctl = cryptocop_ioctl
.unlocked_ioctl = cryptocop_ioctl,
.llseek = noop_llseek,
};


Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/drivers/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ static const struct file_operations i2c_fops = {
.unlocked_ioctl = i2c_ioctl,
.open = i2c_open,
.release = i2c_release,
.llseek = noop_llseek,
};

static int __init i2c_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/drivers/mach-a3/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ static const struct file_operations gpio_fops = {
.write = gpio_write,
.open = gpio_open,
.release = gpio_release,
.llseek = noop_llseek,
};

#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/drivers/mach-fs/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ static const struct file_operations gpio_fops = {
.write = gpio_write,
.open = gpio_open,
.release = gpio_release,
.llseek = noop_llseek,
};

#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/drivers/pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static int voltage_low;
static const struct file_operations pcf8563_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = pcf8563_unlocked_ioctl,
.llseek = noop_llseek,
};

unsigned char
Expand Down
3 changes: 2 additions & 1 deletion arch/cris/arch-v32/drivers/sync_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ static const struct file_operations sync_serial_fops = {
.poll = sync_serial_poll,
.unlocked_ioctl = sync_serial_ioctl,
.open = sync_serial_open,
.release = sync_serial_release
.release = sync_serial_release,
.llseek = noop_llseek,
};

static int __init etrax_sync_serial_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/cris/kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ write_cris_profile(struct file *file, const char __user *buf,
static const struct file_operations cris_proc_profile_operations = {
.read = read_cris_profile,
.write = write_cris_profile,
.llseek = default_llseek,
};

static int __init init_cris_profile(void)
Expand Down
2 changes: 2 additions & 0 deletions arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t
static const struct file_operations salinfo_event_fops = {
.open = salinfo_event_open,
.read = salinfo_event_read,
.llseek = noop_llseek,
};

static int
Expand Down Expand Up @@ -571,6 +572,7 @@ static const struct file_operations salinfo_data_fops = {
.release = salinfo_log_release,
.read = salinfo_log_read,
.write = salinfo_log_write,
.llseek = default_llseek,
};

static int __cpuinit
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ static long sn_hwperf_ioctl(struct file *fp, u32 op, unsigned long arg)

static const struct file_operations sn_hwperf_fops = {
.unlocked_ioctl = sn_hwperf_ioctl,
.llseek = noop_llseek,
};

static struct miscdevice sn_hwperf_dev = {
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/bvme6000/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static const struct file_operations rtc_fops = {
.unlocked_ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
.llseek = noop_llseek,
};

static struct miscdevice rtc_dev = {
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/mvme16x/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static const struct file_operations rtc_fops = {
.unlocked_ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
.llseek = noop_llseek,
};

static struct miscdevice rtc_dev=
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/kernel/rtlx.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ static const struct file_operations rtlx_fops = {
.release = file_release,
.write = file_write,
.read = file_read,
.poll = file_poll
.poll = file_poll,
.llseek = noop_llseek,
};

static struct irqaction rtlx_irq = {
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,8 @@ static const struct file_operations vpe_fops = {
.owner = THIS_MODULE,
.open = vpe_open,
.release = vpe_release,
.write = vpe_write
.write = vpe_write,
.llseek = noop_llseek,
};

/* module wrapper entry points */
Expand Down
1 change: 1 addition & 0 deletions arch/mips/sibyte/common/sb_tbprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ static const struct file_operations sbprof_tb_fops = {
.unlocked_ioctl = sbprof_tb_ioctl,
.compat_ioctl = sbprof_tb_ioctl,
.mmap = NULL,
.llseek = default_llseek,
};

static struct class *tb_class;
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ static const struct file_operations lparcfg_fops = {
.write = lparcfg_write,
.open = lparcfg_open,
.release = single_release,
.llseek = seq_lseek,
};

static int __init lparcfg_init(void)
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/rtas_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ static const struct file_operations rtas_flash_operations = {
.write = rtas_flash_write,
.open = rtas_excl_open,
.release = rtas_flash_release,
.llseek = default_llseek,
};

static const struct file_operations manage_flash_operations = {
Expand All @@ -724,6 +725,7 @@ static const struct file_operations manage_flash_operations = {
.write = manage_flash_write,
.open = rtas_excl_open,
.release = rtas_excl_release,
.llseek = default_llseek,
};

static const struct file_operations validate_flash_operations = {
Expand All @@ -732,6 +734,7 @@ static const struct file_operations validate_flash_operations = {
.write = validate_flash_write,
.open = rtas_excl_open,
.release = validate_flash_release,
.llseek = default_llseek,
};

static int __init rtas_flash_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/rtasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ static const struct file_operations proc_rtas_log_operations = {
.poll = rtas_log_poll,
.open = rtas_log_open,
.release = rtas_log_release,
.llseek = noop_llseek,
};

static int enable_surveillance(int timeout)
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/iseries/mf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ static ssize_t proc_mf_change_vmlinux(struct file *file,

static const struct file_operations proc_vmlinux_operations = {
.write = proc_mf_change_vmlinux,
.llseek = default_llseek,
};

static int __init mf_proc_init(void)
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t coun
}

static const struct file_operations ofdt_fops = {
.write = ofdt_write
.write = ofdt_write,
.llseek = noop_llseek,
};

/* create /proc/powerpc/ofdt write-only by root */
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/scanlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const struct file_operations scanlog_fops = {
.write = scanlog_write,
.open = scanlog_open,
.release = scanlog_release,
.llseek = noop_llseek,
};

static int __init scanlog_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/s390/crypto/prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static const struct file_operations prng_fops = {
.open = &prng_open,
.release = NULL,
.read = &prng_read,
.llseek = noop_llseek,
};

static struct miscdevice prng_dev = {
Expand Down
1 change: 1 addition & 0 deletions arch/s390/hypfs/hypfs_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ static const struct file_operations dbfs_d204_ops = {
.open = dbfs_d204_open,
.read = dbfs_d204_read,
.release = dbfs_d204_release,
.llseek = no_llseek,
};

static int hypfs_dbfs_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/s390/hypfs/hypfs_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ static const struct file_operations dbfs_d2fc_ops = {
.open = dbfs_d2fc_open,
.read = dbfs_d2fc_read,
.release = dbfs_d2fc_release,
.llseek = no_llseek,
};

int hypfs_vm_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ static const struct file_operations hypfs_file_ops = {
.write = do_sync_write,
.aio_read = hypfs_aio_read,
.aio_write = hypfs_aio_write,
.llseek = no_llseek,
};

static struct file_system_type hypfs_type = {
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ 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: 1 addition & 0 deletions arch/sh/boards/mach-landisk/gio.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ static const struct file_operations gio_fops = {
.open = gio_open, /* open */
.release = gio_close, /* release */
.unlocked_ioctl = gio_ioctl,
.llseek = noop_llseek,
};

static int __init gio_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/kernel/apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ static const struct file_operations apc_fops = {
.unlocked_ioctl = apc_ioctl,
.open = apc_open,
.release = apc_release,
.llseek = noop_llseek,
};

static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/kernel/mdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ static ssize_t mdesc_read(struct file *file, char __user *buf,
static const struct file_operations mdesc_fops = {
.read = mdesc_read,
.owner = THIS_MODULE,
.llseek = noop_llseek,
};

static struct miscdevice mdesc_misc = {
Expand Down
1 change: 1 addition & 0 deletions arch/tile/kernel/hardwall.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ static const struct file_operations dev_hardwall_fops = {
#endif
.flush = hardwall_flush,
.release = hardwall_release,
.llseek = noop_llseek,
};

static struct cdev hardwall_dev;
Expand Down
1 change: 1 addition & 0 deletions arch/um/drivers/harddog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ static const struct file_operations harddog_fops = {
.unlocked_ioctl = harddog_ioctl,
.open = harddog_open,
.release = harddog_release,
.llseek = no_llseek,
};

static struct miscdevice harddog_miscdev = {
Expand Down
Loading

0 comments on commit 092e0e7

Please sign in to comment.