*: convert stream-like files from nonseekable_open -> stream_open
authorKirill Smelkov <kirr@nexedi.com>
Tue, 26 Mar 2019 20:51:19 +0000 (23:51 +0300)
committerKirill Smelkov <kirr@nexedi.com>
Mon, 6 May 2019 14:46:41 +0000 (17:46 +0300)
Using scripts/coccinelle/api/stream_open.cocci added in 10dce8af3422
("fs: stream_open - opener for stream-like files so that read and write
can run simultaneously without deadlock"), search and convert to
stream_open all in-kernel nonseekable_open users for which read and
write actually do not depend on ppos and where there is no other methods
in file_operations which assume @offset access.

I've verified each generated change manually - that it is correct to convert -
and each other nonseekable_open instance left - that it is either not correct
to convert there, or that it is not converted due to current stream_open.cocci
limitations. The script also does not convert files that should be valid to
convert, but that currently have .llseek = noop_llseek or generic_file_llseek
for unknown reason despite file being opened with nonseekable_open (e.g.
drivers/input/mousedev.c)

Among cases converted 14 were potentially vulnerable to read vs write deadlock
(see details in 10dce8af3422):

drivers/char/pcmcia/cm4000_cs.c:1685:7-23: ERROR: cm4000_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/gnss/core.c:45:1-17: ERROR: gnss_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/hid/uhid.c:635:1-17: ERROR: uhid_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/infiniband/core/user_mad.c:988:1-17: ERROR: umad_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/input/evdev.c:527:1-17: ERROR: evdev_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/input/misc/uinput.c:401:1-17: ERROR: uinput_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/isdn/capi/capi.c:963:8-24: ERROR: capi_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/leds/uleds.c:77:1-17: ERROR: uleds_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/media/rc/lirc_dev.c:198:1-17: ERROR: lirc_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/s390/char/fs3270.c:488:1-17: ERROR: fs3270_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/usb/misc/ldusb.c:310:1-17: ERROR: ld_usb_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
drivers/xen/evtchn.c:667:8-24: ERROR: evtchn_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
net/batman-adv/icmp_socket.c:80:1-17: ERROR: batadv_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
net/rfkill/core.c:1146:8-24: ERROR: rfkill_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.

and the rest were just safe to convert to stream_open because their read and
write do not use ppos at all and corresponding file_operations do not
have methods that assume @offset file access(*):

arch/powerpc/platforms/52xx/mpc52xx_gpt.c:631:8-24: WARNING: mpc52xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/um/drivers/harddog_kern.c:88:8-24: WARNING: harddog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
arch/x86/kernel/cpu/microcode/core.c:430:33-49: WARNING: microcode_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/char/ds1620.c:215:8-24: WARNING: ds1620_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/char/dtlk.c:301:1-17: WARNING: dtlk_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/char/ipmi/ipmi_watchdog.c:840:9-25: WARNING: ipmi_wdog_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/char/pcmcia/scr24x_cs.c:95:8-24: WARNING: scr24x_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/char/tb0219.c:246:9-25: WARNING: tb0219_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/firewire/nosy.c:306:8-24: WARNING: nosy_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/hwmon/fschmd.c:840:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/hwmon/w83793.c:1344:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/infiniband/core/ucma.c:1747:8-24: WARNING: ucma_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/infiniband/core/ucm.c:1178:8-24: WARNING: ucm_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/infiniband/core/uverbs_main.c:1086:8-24: WARNING: uverbs_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/input/joydev.c:282:1-17: WARNING: joydev_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/pci/switch/switchtec.c:393:1-17: WARNING: switchtec_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/platform/chrome/cros_ec_debugfs.c:135:8-24: WARNING: cros_ec_console_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/rtc/rtc-ds1374.c:470:9-25: WARNING: ds1374_wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/rtc/rtc-m41t80.c:805:9-25: WARNING: wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/s390/char/tape_char.c:293:2-18: WARNING: tape_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/s390/char/zcore.c:194:8-24: WARNING: zcore_reipl_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/s390/crypto/zcrypt_api.c:528:8-24: WARNING: zcrypt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/spi/spidev.c:594:1-17: WARNING: spidev_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/staging/pi433/pi433_if.c:974:1-17: WARNING: pi433_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/acquirewdt.c:203:8-24: WARNING: acq_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/advantechwdt.c:202:8-24: WARNING: advwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/alim1535_wdt.c:252:8-24: WARNING: ali_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/alim7101_wdt.c:217:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ar7_wdt.c:166:8-24: WARNING: ar7_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/at91rm9200_wdt.c:113:8-24: WARNING: at91wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ath79_wdt.c:135:8-24: WARNING: ath79_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/bcm63xx_wdt.c:119:8-24: WARNING: bcm63xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/cpu5wdt.c:143:8-24: WARNING: cpu5wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/cpwd.c:397:8-24: WARNING: cpwd_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/eurotechwdt.c:319:8-24: WARNING: eurwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/f71808e_wdt.c:528:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/gef_wdt.c:232:8-24: WARNING: gef_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/geodewdt.c:95:8-24: WARNING: geodewdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ib700wdt.c:241:8-24: WARNING: ibwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ibmasr.c:326:8-24: WARNING: asr_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/indydog.c:80:8-24: WARNING: indydog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/intel_scu_watchdog.c:307:8-24: WARNING: intel_scu_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/iop_wdt.c:104:8-24: WARNING: iop_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/it8712f_wdt.c:330:8-24: WARNING: it8712f_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ixp4xx_wdt.c:68:8-24: WARNING: ixp4xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/ks8695_wdt.c:145:8-24: WARNING: ks8695wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/m54xx_wdt.c:88:8-24: WARNING: m54xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/machzwd.c:336:8-24: WARNING: zf_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/mixcomwd.c:153:8-24: WARNING: mixcomwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/mtx-1_wdt.c:121:8-24: WARNING: mtx1_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/mv64x60_wdt.c:136:8-24: WARNING: mv64x60_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/nuc900_wdt.c:134:8-24: WARNING: nuc900wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/nv_tco.c:164:8-24: WARNING: nv_tco_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pc87413_wdt.c:289:8-24: WARNING: pc87413_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd.c:698:8-24: WARNING: pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd.c:737:8-24: WARNING: pcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd_pci.c:581:8-24: WARNING: pcipcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd_pci.c:623:8-24: WARNING: pcipcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd_usb.c:488:8-24: WARNING: usb_pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pcwd_usb.c:527:8-24: WARNING: usb_pcwd_temperature_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pika_wdt.c:121:8-24: WARNING: pikawdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/pnx833x_wdt.c:119:8-24: WARNING: pnx833x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/rc32434_wdt.c:153:8-24: WARNING: rc32434_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/rdc321x_wdt.c:145:8-24: WARNING: rdc321x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/riowd.c:79:1-17: WARNING: riowd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sa1100_wdt.c:62:8-24: WARNING: sa1100dog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sbc60xxwdt.c:211:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sbc7240_wdt.c:139:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sbc8360.c:274:8-24: WARNING: sbc8360_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sbc_epx_c3.c:81:8-24: WARNING: epx_c3_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sbc_fitpc2_wdt.c:78:8-24: WARNING: fitpc2_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sb_wdog.c:108:1-17: WARNING: sbwdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sc1200wdt.c:181:8-24: WARNING: sc1200wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sc520_wdt.c:261:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/sch311x_wdt.c:319:8-24: WARNING: sch311x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/scx200_wdt.c:105:8-24: WARNING: scx200_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/smsc37b787_wdt.c:369:8-24: WARNING: wb_smsc_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/w83877f_wdt.c:227:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/w83977f_wdt.c:301:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wafer5823wdt.c:200:8-24: WARNING: wafwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/watchdog_dev.c:828:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdrtas.c:379:8-24: WARNING: wdrtas_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdrtas.c:445:8-24: WARNING: wdrtas_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt285.c:104:1-17: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt977.c:276:8-24: WARNING: wdt977_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt.c:424:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt.c:484:8-24: WARNING: wdt_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt_pci.c:464:8-24: WARNING: wdtpci_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
drivers/watchdog/wdt_pci.c:527:8-24: WARNING: wdtpci_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
net/batman-adv/log.c:105:1-17: WARNING: batadv_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
sound/core/control.c:57:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
sound/core/rawmidi.c:385:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
sound/core/seq/seq_clientmgr.c:310:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
sound/core/timer.c:1428:7-23: WARNING: snd_timer_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

One can also recheck/review the patch via generating it with explanation comments included via

$ make coccicheck MODE=patch COCCI=scripts/coccinelle/api/stream_open.cocci SPFLAGS="-D explain"

(*) This second group also contains cases with read/write deadlocks that
stream_open.cocci don't yet detect, but which are still valid to convert to
stream_open since ppos is not used. For example drivers/pci/switch/switchtec.c
calls wait_for_completion_interruptible() in its .read, but stream_open.cocci
currently detects only "wait_event*" as blocking.

Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Yongzhi Pan <panyongzhi@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Tejun Heo <tj@kernel.org>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Nikolaus Rath <Nikolaus@rath.org>
Cc: Han-Wen Nienhuys <hanwen@google.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James R. Van Zandt" <jrv@vanzandt.mv.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Lubomir Rintel <lkundrak@v3.sk> [scr24x_cs]
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Johan Hovold <johan@kernel.org>
Cc: David Herrmann <dh.herrmann@googlemail.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Jean Delvare <jdelvare@suse.com>
Acked-by: Guenter Roeck <linux@roeck-us.net> [watchdog/* hwmon/*]
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Acked-by: Logan Gunthorpe <logang@deltatee.com> [drivers/pci/switch/switchtec]
Acked-by: Bjorn Helgaas <bhelgaas@google.com> [drivers/pci/switch/switchtec]
Cc: Benson Leung <bleung@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> [platform/chrome]
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> [rtc/*]
Cc: Mark Brown <broonie@kernel.org>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Zwane Mwaikambo <zwanem@gmail.com>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Antonio Quartulli <a@unstable.cc>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
103 files changed:
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
arch/powerpc/platforms/cell/spufs/file.c
arch/um/drivers/harddog_kern.c
arch/x86/kernel/cpu/microcode/core.c
drivers/char/ds1620.c
drivers/char/dtlk.c
drivers/char/ipmi/ipmi_watchdog.c
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/scr24x_cs.c
drivers/char/tb0219.c
drivers/firewire/nosy.c
drivers/gnss/core.c
drivers/hid/uhid.c
drivers/hwmon/fschmd.c
drivers/hwmon/w83793.c
drivers/infiniband/core/ucm.c
drivers/infiniband/core/ucma.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_main.c
drivers/input/evdev.c
drivers/input/joydev.c
drivers/input/misc/uinput.c
drivers/isdn/capi/capi.c
drivers/leds/uleds.c
drivers/media/rc/lirc_dev.c
drivers/pci/switch/switchtec.c
drivers/platform/chrome/cros_ec_debugfs.c
drivers/rtc/rtc-ds1374.c
drivers/rtc/rtc-m41t80.c
drivers/s390/char/fs3270.c
drivers/s390/char/tape_char.c
drivers/s390/char/zcore.c
drivers/s390/crypto/zcrypt_api.c
drivers/spi/spidev.c
drivers/staging/pi433/pi433_if.c
drivers/usb/misc/ldusb.c
drivers/watchdog/acquirewdt.c
drivers/watchdog/advantechwdt.c
drivers/watchdog/alim1535_wdt.c
drivers/watchdog/alim7101_wdt.c
drivers/watchdog/ar7_wdt.c
drivers/watchdog/at91rm9200_wdt.c
drivers/watchdog/ath79_wdt.c
drivers/watchdog/bcm63xx_wdt.c
drivers/watchdog/cpu5wdt.c
drivers/watchdog/cpwd.c
drivers/watchdog/eurotechwdt.c
drivers/watchdog/f71808e_wdt.c
drivers/watchdog/gef_wdt.c
drivers/watchdog/geodewdt.c
drivers/watchdog/ib700wdt.c
drivers/watchdog/ibmasr.c
drivers/watchdog/indydog.c
drivers/watchdog/intel_scu_watchdog.c
drivers/watchdog/iop_wdt.c
drivers/watchdog/it8712f_wdt.c
drivers/watchdog/ixp4xx_wdt.c
drivers/watchdog/ks8695_wdt.c
drivers/watchdog/m54xx_wdt.c
drivers/watchdog/machzwd.c
drivers/watchdog/mixcomwd.c
drivers/watchdog/mtx-1_wdt.c
drivers/watchdog/mv64x60_wdt.c
drivers/watchdog/nuc900_wdt.c
drivers/watchdog/nv_tco.c
drivers/watchdog/pc87413_wdt.c
drivers/watchdog/pcwd.c
drivers/watchdog/pcwd_pci.c
drivers/watchdog/pcwd_usb.c
drivers/watchdog/pika_wdt.c
drivers/watchdog/pnx833x_wdt.c
drivers/watchdog/rc32434_wdt.c
drivers/watchdog/rdc321x_wdt.c
drivers/watchdog/riowd.c
drivers/watchdog/sa1100_wdt.c
drivers/watchdog/sb_wdog.c
drivers/watchdog/sbc60xxwdt.c
drivers/watchdog/sbc7240_wdt.c
drivers/watchdog/sbc8360.c
drivers/watchdog/sbc_epx_c3.c
drivers/watchdog/sbc_fitpc2_wdt.c
drivers/watchdog/sc1200wdt.c
drivers/watchdog/sc520_wdt.c
drivers/watchdog/sch311x_wdt.c
drivers/watchdog/scx200_wdt.c
drivers/watchdog/smsc37b787_wdt.c
drivers/watchdog/w83877f_wdt.c
drivers/watchdog/w83977f_wdt.c
drivers/watchdog/wafer5823wdt.c
drivers/watchdog/watchdog_dev.c
drivers/watchdog/wdrtas.c
drivers/watchdog/wdt.c
drivers/watchdog/wdt285.c
drivers/watchdog/wdt977.c
drivers/watchdog/wdt_pci.c
drivers/xen/evtchn.c
net/batman-adv/icmp_socket.c
net/batman-adv/log.c
net/rfkill/core.c
sound/core/control.c
sound/core/rawmidi.c
sound/core/seq/seq_clientmgr.c
sound/core/timer.c

index 17cf249..3cb2f07 100644 (file)
@@ -628,7 +628,7 @@ static int mpc52xx_wdt_open(struct inode *inode, struct file *file)
        }
 
        file->private_data = mpc52xx_gpt_wdt;
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int mpc52xx_wdt_release(struct inode *inode, struct file *file)
index 48c2477..bfb9ca9 100644 (file)
@@ -588,7 +588,7 @@ static int spufs_pipe_open(struct inode *inode, struct file *file)
        struct spufs_inode_info *i = SPUFS_I(inode);
        file->private_data = i->i_ctx;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index 6d38127..000cb69 100644 (file)
@@ -85,7 +85,7 @@ static int harddog_open(struct inode *inode, struct file *file)
        timer_alive = 1;
        spin_unlock(&lock);
        mutex_unlock(&harddog_mutex);
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 err:
        spin_unlock(&lock);
        mutex_unlock(&harddog_mutex);
index 5260185..6398177 100644 (file)
@@ -427,7 +427,7 @@ static int do_microcode_update(const void __user *buf, size_t size)
 
 static int microcode_open(struct inode *inode, struct file *file)
 {
-       return capable(CAP_SYS_RAWIO) ? nonseekable_open(inode, file) : -EPERM;
+       return capable(CAP_SYS_RAWIO) ? stream_open(inode, file) : -EPERM;
 }
 
 static ssize_t microcode_write(struct file *file, const char __user *buf,
index a5ecf6d..373f549 100644 (file)
@@ -212,7 +212,7 @@ static void ds1620_read_state(struct therm *therm)
 
 static int ds1620_open(struct inode *inode, struct file *file)
 {
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t
index 669c331..4fed8fa 100644 (file)
@@ -302,7 +302,7 @@ static int dtlk_open(struct inode *inode, struct file *file)
        case DTLK_MINOR:
                if (dtlk_busy)
                        return -EBUSY;
-               return nonseekable_open(inode, file);
+               return stream_open(inode, file);
 
        default:
                return -ENXIO;
index 2924a4b..74c6d1f 100644 (file)
@@ -837,7 +837,7 @@ static int ipmi_open(struct inode *ino, struct file *filep)
                 * first heartbeat.
                 */
                ipmi_start_timer_on_heartbeat = 1;
-               return nonseekable_open(ino, filep);
+               return stream_open(ino, filep);
 
        default:
                return (-ENODEV);
index 7a4eb86..15bf585 100644 (file)
@@ -1682,7 +1682,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
        link->open = 1;         /* only one open per device */
 
        DEBUGP(2, dev, "<- cmm_open\n");
-       ret = nonseekable_open(inode, filp);
+       ret = stream_open(inode, filp);
 out:
        mutex_unlock(&cmm_mutex);
        return ret;
index f6b43d9..04b39c3 100644 (file)
@@ -92,7 +92,7 @@ static int scr24x_open(struct inode *inode, struct file *filp)
        kref_get(&dev->refcnt);
        filp->private_data = dev;
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int scr24x_release(struct inode *inode, struct file *filp)
index 7c19d9b..e8614ea 100644 (file)
@@ -243,7 +243,7 @@ static int tanbac_tb0219_open(struct inode *inode, struct file *file)
        case 16 ... 23:
        case 32 ... 39:
        case 48 ... 55:
-               return nonseekable_open(inode, file);
+               return stream_open(inode, file);
        default:
                break;
        }
index a128dd1..515e96d 100644 (file)
@@ -303,7 +303,7 @@ nosy_open(struct inode *inode, struct file *file)
 
        file->private_data = client;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 fail:
        kfree(client);
        lynx_put(lynx);
index 320cfca..e6f9450 100644 (file)
@@ -42,7 +42,7 @@ static int gnss_open(struct inode *inode, struct file *file)
 
        get_device(&gdev->dev);
 
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
        file->private_data = gdev;
 
        down_write(&gdev->rwsem);
index 840634e..dbaead0 100644 (file)
@@ -632,7 +632,7 @@ static int uhid_char_open(struct inode *inode, struct file *file)
        INIT_WORK(&uhid->worker, uhid_device_add_worker);
 
        file->private_data = uhid;
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 }
index 042a166..8fb5407 100644 (file)
@@ -837,7 +837,7 @@ static int watchdog_open(struct inode *inode, struct file *filp)
        watchdog_trigger(data);
        filp->private_data = data;
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int watchdog_release(struct inode *inode, struct file *filp)
index 0af0f62..e94ae1b 100644 (file)
@@ -1341,7 +1341,7 @@ static int watchdog_open(struct inode *inode, struct file *filp)
        /* Store pointer to data into filp's private data */
        filp->private_data = data;
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int watchdog_close(struct inode *inode, struct file *filp)
index 7541fba..65c3230 100644 (file)
@@ -1175,7 +1175,7 @@ static int ib_ucm_open(struct inode *inode, struct file *filp)
        file->filp = filp;
        file->device = container_of(inode->i_cdev, struct ib_ucm_device, cdev);
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int ib_ucm_close(struct inode *inode, struct file *filp)
index 7468b26..140a338 100644 (file)
@@ -1744,7 +1744,7 @@ static int ucma_open(struct inode *inode, struct file *filp)
        filp->private_data = file;
        file->filp = filp;
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int ucma_close(struct inode *inode, struct file *filp)
index 02b7947..b58b07c 100644 (file)
@@ -985,7 +985,7 @@ static int ib_umad_open(struct inode *inode, struct file *filp)
 
        list_add_tail(&file->port_list, &port->file_list);
 
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
 out:
        mutex_unlock(&port->file_mutex);
        return ret;
index c489f54..8b43dd9 100644 (file)
@@ -1132,7 +1132,7 @@ static int ib_uverbs_open(struct inode *inode, struct file *filp)
 
        setup_ufile_idr_uobject(file);
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 
 err_module:
        module_put(ib_dev->owner);
index f48369d..f040d88 100644 (file)
@@ -524,7 +524,7 @@ static int evdev_open(struct inode *inode, struct file *file)
                goto err_free_client;
 
        file->private_data = client;
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 
index 4c1e427..d806f6b 100644 (file)
@@ -279,7 +279,7 @@ static int joydev_open(struct inode *inode, struct file *file)
                goto err_free_client;
 
        file->private_data = client;
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 
index 26ec603..1a6762f 100644 (file)
@@ -398,7 +398,7 @@ static int uinput_open(struct inode *inode, struct file *file)
        newdev->state = UIST_NEW_DEVICE;
 
        file->private_data = newdev;
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 }
index e1da70a..3c3ad42 100644 (file)
@@ -960,7 +960,7 @@ static int capi_open(struct inode *inode, struct file *file)
        list_add_tail(&cdev->list, &capidev_list);
        mutex_unlock(&capidev_list_lock);
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int capi_release(struct inode *inode, struct file *file)
index 0c43bfa..08b6a76 100644 (file)
@@ -74,7 +74,7 @@ static int uleds_open(struct inode *inode, struct file *file)
        udev->state = ULEDS_STATE_UNKNOWN;
 
        file->private_data = udev;
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 }
index f862f1b..92db1e8 100644 (file)
@@ -195,7 +195,7 @@ static int ir_lirc_open(struct inode *inode, struct file *file)
        list_add(&fh->list, &dev->lirc_fh);
        spin_unlock_irqrestore(&dev->lirc_fh_lock, flags);
 
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        return 0;
 out_kfifo:
index e22766c..0f7b801 100644 (file)
@@ -390,7 +390,7 @@ static int switchtec_dev_open(struct inode *inode, struct file *filp)
                return PTR_ERR(stuser);
 
        filp->private_data = stuser;
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
 
        dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser);
 
index 7130876..2b8e8a0 100644 (file)
@@ -132,7 +132,7 @@ static int cros_ec_console_log_open(struct inode *inode, struct file *file)
 {
        file->private_data = inode->i_private;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t cros_ec_console_log_read(struct file *file, char __user *buf,
index 38a2e9e..225a8df 100644 (file)
@@ -467,7 +467,7 @@ static int ds1374_wdt_open(struct inode *inode, struct file *file)
                 */
                wdt_is_open = 1;
                mutex_unlock(&ds1374->mutex);
-               return nonseekable_open(inode, file);
+               return stream_open(inode, file);
        }
        return -ENODEV;
 }
index ebf50b1..dd5a899 100644 (file)
@@ -802,7 +802,7 @@ static int wdt_open(struct inode *inode, struct file *file)
                 */
                wdt_is_open = 1;
                mutex_unlock(&m41t80_rtc_mutex);
-               return nonseekable_open(inode, file);
+               return stream_open(inode, file);
        }
        return -ENODEV;
 }
index 8b48ba9..4c4683d 100644 (file)
@@ -486,7 +486,7 @@ fs3270_open(struct inode *inode, struct file *filp)
                raw3270_del_view(&fp->view);
                goto out;
        }
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
        filp->private_data = fp;
 out:
        mutex_unlock(&fs3270_mutex);
index fc206c9..ea42539 100644 (file)
@@ -290,7 +290,7 @@ tapechar_open (struct inode *inode, struct file *filp)
        rc = tape_open(device);
        if (rc == 0) {
                filp->private_data = device;
-               nonseekable_open(inode, filp);
+               stream_open(inode, filp);
        } else
                tape_put_device(device);
 
index 76d3c50..a57e1c5 100644 (file)
@@ -191,7 +191,7 @@ static ssize_t zcore_reipl_write(struct file *filp, const char __user *buf,
 
 static int zcore_reipl_open(struct inode *inode, struct file *filp)
 {
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int zcore_reipl_release(struct inode *inode, struct file *filp)
index 689c2af..6bfdc69 100644 (file)
@@ -525,7 +525,7 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
        filp->private_data = (void *) perms;
 
        atomic_inc(&zcrypt_open_count);
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 /**
index b0c76e2..7fd0d99 100644 (file)
@@ -591,7 +591,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
 
        spidev->users++;
        filp->private_data = spidev;
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
 
        mutex_unlock(&device_list_lock);
        return 0;
index b231463..2299a11 100644 (file)
@@ -971,7 +971,7 @@ static int pi433_open(struct inode *inode, struct file *filp)
 
        /* instance data as context */
        filp->private_data = instance;
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
 
        return 0;
 }
index 006762b..6581774 100644 (file)
@@ -307,7 +307,7 @@ static int ld_usb_open(struct inode *inode, struct file *file)
        int retval;
        struct usb_interface *interface;
 
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
        subminor = iminor(inode);
 
        interface = usb_find_interface(&ld_usb_driver, subminor);
index d6210d9..957d125 100644 (file)
@@ -200,7 +200,7 @@ static int acq_open(struct inode *inode, struct file *file)
 
        /* Activate */
        acq_keepalive();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int acq_close(struct inode *inode, struct file *file)
index f619443..2766af2 100644 (file)
@@ -199,7 +199,7 @@ static int advwdt_open(struct inode *inode, struct file *file)
         */
 
        advwdt_ping();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int advwdt_close(struct inode *inode, struct file *file)
index 60f0c2e..39a07bb 100644 (file)
@@ -249,7 +249,7 @@ static int ali_open(struct inode *inode, struct file *file)
 
        /* Activate */
        ali_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index 12f7ea6..7e98849 100644 (file)
@@ -214,7 +214,7 @@ static int fop_open(struct inode *inode, struct file *file)
                return -EBUSY;
        /* Good, fire up the show */
        wdt_startup();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int fop_close(struct inode *inode, struct file *file)
index ee1ab12..b9b2d06 100644 (file)
@@ -163,7 +163,7 @@ static int ar7_wdt_open(struct inode *inode, struct file *file)
        ar7_wdt_enable_wdt();
        expect_close = 0;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int ar7_wdt_release(struct inode *inode, struct file *file)
index b45fc0a..907a454 100644 (file)
@@ -110,7 +110,7 @@ static int at91_wdt_open(struct inode *inode, struct file *file)
                return -EBUSY;
 
        at91_wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index e2209bf..4f56b63 100644 (file)
@@ -132,7 +132,7 @@ static int ath79_wdt_open(struct inode *inode, struct file *file)
        clear_bit(WDT_FLAGS_EXPECT_CLOSE, &wdt_flags);
        ath79_wdt_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int ath79_wdt_release(struct inode *inode, struct file *file)
index d3c1113..e2af37c 100644 (file)
@@ -116,7 +116,7 @@ static int bcm63xx_wdt_open(struct inode *inode, struct file *file)
                return -EBUSY;
 
        bcm63xx_wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int bcm63xx_wdt_release(struct inode *inode, struct file *file)
index 6cfb102..475360d 100644 (file)
@@ -140,7 +140,7 @@ static int cpu5wdt_open(struct inode *inode, struct file *file)
 {
        if (test_and_set_bit(0, &cpu5wdt_device.inuse))
                return -EBUSY;
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int cpu5wdt_release(struct inode *inode, struct file *file)
index 32156e1..b5b078b 100644 (file)
@@ -394,7 +394,7 @@ static int cpwd_open(struct inode *inode, struct file *f)
 
        mutex_unlock(&cpwd_mutex);
 
-       return nonseekable_open(inode, f);
+       return stream_open(inode, f);
 }
 
 static int cpwd_release(struct inode *inode, struct file *file)
index 47f77a6..89129e6 100644 (file)
@@ -316,7 +316,7 @@ static int eurwdt_open(struct inode *inode, struct file *file)
        eurwdt_timeout = WDT_TIMEOUT;   /* initial timeout */
        /* Activate the WDT */
        eurwdt_activate_timer();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
index 9a1c761..021c6ac 100644 (file)
@@ -525,7 +525,7 @@ static int watchdog_open(struct inode *inode, struct file *file)
                __module_get(THIS_MODULE);
 
        watchdog.expect_close = 0;
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int watchdog_release(struct inode *inode, struct file *file)
index 006e234..26350b3 100644 (file)
@@ -229,7 +229,7 @@ static int gef_wdt_open(struct inode *inode, struct file *file)
 
        gef_wdt_handler_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int gef_wdt_release(struct inode *inode, struct file *file)
index 88e0123..c5a727d 100644 (file)
@@ -92,7 +92,7 @@ static int geodewdt_open(struct inode *inode, struct file *file)
                __module_get(THIS_MODULE);
 
        geodewdt_ping();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int geodewdt_release(struct inode *inode, struct file *file)
index cc26228..30d6cec 100644 (file)
@@ -238,7 +238,7 @@ static int ibwdt_open(struct inode *inode, struct file *file)
 
        /* Activate */
        ibwdt_ping();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int ibwdt_close(struct inode *inode, struct file *file)
index 366b047..897f7ed 100644 (file)
@@ -323,7 +323,7 @@ static int asr_open(struct inode *inode, struct file *file)
        asr_toggle();
        asr_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int asr_release(struct inode *inode, struct file *file)
index 5d20cdd..5592b97 100644 (file)
@@ -77,7 +77,7 @@ static int indydog_open(struct inode *inode, struct file *file)
 
        pr_info("Started watchdog timer\n");
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int indydog_release(struct inode *inode, struct file *file)
index 0caab62..3181a72 100644 (file)
@@ -304,7 +304,7 @@ static int intel_scu_open(struct inode *inode, struct file *file)
        if (watchdog_device.driver_closed)
                return -EPERM;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int intel_scu_release(struct inode *inode, struct file *file)
index b16013f..d910a7d 100644 (file)
@@ -101,7 +101,7 @@ static int iop_wdt_open(struct inode *inode, struct file *file)
        clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
        wdt_enable();
        set_bit(WDT_ENABLED, &wdt_status);
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t iop_wdt_write(struct file *file, const char *data, size_t len,
index 41b3979..b156724 100644 (file)
@@ -327,7 +327,7 @@ static int it8712f_wdt_open(struct inode *inode, struct file *file)
        ret = it8712f_wdt_enable();
        if (ret)
                return ret;
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int it8712f_wdt_release(struct inode *inode, struct file *file)
index f20cc53..dd139cd 100644 (file)
@@ -65,7 +65,7 @@ static int ixp4xx_wdt_open(struct inode *inode, struct file *file)
 
        clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
        wdt_enable();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t
index 1e41818..0565cf3 100644 (file)
@@ -142,7 +142,7 @@ static int ks8695_wdt_open(struct inode *inode, struct file *file)
                return -EBUSY;
 
        ks8695_wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index da6fa2b..752d036 100644 (file)
@@ -85,7 +85,7 @@ static int m54xx_wdt_open(struct inode *inode, struct file *file)
 
        clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
        wdt_enable();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t m54xx_wdt_write(struct file *file, const char *data,
index 88d823d..5375941 100644 (file)
@@ -333,7 +333,7 @@ static int zf_open(struct inode *inode, struct file *file)
        if (nowayout)
                __module_get(THIS_MODULE);
        zf_timer_on();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int zf_close(struct inode *inode, struct file *file)
index 3cc0744..ece56db 100644 (file)
@@ -150,7 +150,7 @@ static int mixcomwd_open(struct inode *inode, struct file *file)
                        mixcomwd_timer_alive = 0;
                }
        }
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int mixcomwd_release(struct inode *inode, struct file *file)
index e028e0a..25a9285 100644 (file)
@@ -118,7 +118,7 @@ static int mtx1_wdt_open(struct inode *inode, struct file *file)
 {
        if (test_and_set_bit(0, &mtx1_wdt_device.inuse))
                return -EBUSY;
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 
index 315275d..c785f4f 100644 (file)
@@ -133,7 +133,7 @@ static int mv64x60_wdt_open(struct inode *inode, struct file *file)
 
        mv64x60_wdt_handler_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int mv64x60_wdt_release(struct inode *inode, struct file *file)
index 830bd04..8a36350 100644 (file)
@@ -131,7 +131,7 @@ static int nuc900_wdt_open(struct inode *inode, struct file *file)
 
        nuc900_wdt_start();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int nuc900_wdt_close(struct inode *inode, struct file *file)
index a0fabf6..98d4f53 100644 (file)
@@ -161,7 +161,7 @@ static int nv_tco_open(struct inode *inode, struct file *file)
        /* Reload and activate timer */
        tco_timer_keepalive();
        tco_timer_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int nv_tco_release(struct inode *inode, struct file *file)
index 2ffa39b..ca21d6c 100644 (file)
@@ -286,7 +286,7 @@ static int pc87413_open(struct inode *inode, struct file *file)
 
        pr_info("Watchdog enabled. Timeout set to %d minute(s).\n", timeout);
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
index b72ce68..a3415cf 100644 (file)
@@ -695,7 +695,7 @@ static int pcwd_open(struct inode *inode, struct file *file)
        /* Activate */
        pcwd_start();
        pcwd_keepalive();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int pcwd_close(struct inode *inode, struct file *file)
@@ -734,7 +734,7 @@ static int pcwd_temp_open(struct inode *inode, struct file *file)
        if (!pcwd_private.supports_temp)
                return -ENODEV;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int pcwd_temp_close(struct inode *inode, struct file *file)
index 1f78f09..5773d25 100644 (file)
@@ -578,7 +578,7 @@ static int pcipcwd_open(struct inode *inode, struct file *file)
        /* Activate */
        pcipcwd_start();
        pcipcwd_keepalive();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int pcipcwd_release(struct inode *inode, struct file *file)
@@ -620,7 +620,7 @@ static int pcipcwd_temp_open(struct inode *inode, struct file *file)
        if (!pcipcwd_private.supports_temp)
                return -ENODEV;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int pcipcwd_temp_release(struct inode *inode, struct file *file)
index 4d02f26..5de6182 100644 (file)
@@ -485,7 +485,7 @@ static int usb_pcwd_open(struct inode *inode, struct file *file)
        /* Activate */
        usb_pcwd_start(usb_pcwd_device);
        usb_pcwd_keepalive(usb_pcwd_device);
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int usb_pcwd_release(struct inode *inode, struct file *file)
@@ -524,7 +524,7 @@ static ssize_t usb_pcwd_temperature_read(struct file *file, char __user *data,
 
 static int usb_pcwd_temperature_open(struct inode *inode, struct file *file)
 {
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int usb_pcwd_temperature_release(struct inode *inode, struct file *file)
index bb97f5b..8938b3f 100644 (file)
@@ -118,7 +118,7 @@ static int pikawdt_open(struct inode *inode, struct file *file)
 
        pikawdt_start();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index 882fdcb..312899f 100644 (file)
@@ -116,7 +116,7 @@ static int pnx833x_wdt_open(struct inode *inode, struct file *file)
 
        pr_info("Started watchdog timer\n");
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int pnx833x_wdt_release(struct inode *inode, struct file *file)
index 3a75f3b..e74d5cf 100644 (file)
@@ -150,7 +150,7 @@ static int rc32434_wdt_open(struct inode *inode, struct file *file)
        rc32434_wdt_start();
        rc32434_wdt_ping();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int rc32434_wdt_release(struct inode *inode, struct file *file)
index a281aa8..4382e95 100644 (file)
@@ -142,7 +142,7 @@ static int rdc321x_wdt_open(struct inode *inode, struct file *file)
        if (test_and_set_bit(0, &rdc321x_wdt_device.inuse))
                return -EBUSY;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int rdc321x_wdt_release(struct inode *inode, struct file *file)
index aba5342..f7f7a7a 100644 (file)
@@ -76,7 +76,7 @@ static void riowd_writereg(struct riowd *p, u8 val, int index)
 
 static int riowd_open(struct inode *inode, struct file *filp)
 {
-       nonseekable_open(inode, filp);
+       stream_open(inode, filp);
        return 0;
 }
 
index d3be4f8..bfa035e 100644 (file)
@@ -59,7 +59,7 @@ static int sa1100dog_open(struct inode *inode, struct file *file)
        writel_relaxed(OSSR_M3, OSSR);
        writel_relaxed(OWER_WME, OWER);
        writel_relaxed(readl_relaxed(OIER) | OIER_E3, OIER);
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /*
index 3abae50..0692d42 100644 (file)
@@ -105,7 +105,7 @@ static const struct watchdog_info ident = {
  */
 static int sbwdog_open(struct inode *inode, struct file *file)
 {
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
        if (test_and_set_bit(0, &sbwdog_gate))
                return -EBUSY;
        __module_get(THIS_MODULE);
index 72d15fd..4d127a9 100644 (file)
@@ -208,7 +208,7 @@ static int fop_open(struct inode *inode, struct file *file)
 
        /* Good, fire up the show */
        wdt_startup();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int fop_close(struct inode *inode, struct file *file)
index 5f268ad..efc81b3 100644 (file)
@@ -136,7 +136,7 @@ static int fop_open(struct inode *inode, struct file *file)
 
        wdt_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int fop_close(struct inode *inode, struct file *file)
index da60560..3396024 100644 (file)
@@ -271,7 +271,7 @@ static int sbc8360_open(struct inode *inode, struct file *file)
        /* Activate and ping once to start the countdown */
        sbc8360_activate();
        sbc8360_ping();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int sbc8360_close(struct inode *inode, struct file *file)
index a1c502e..783037f 100644 (file)
@@ -78,7 +78,7 @@ static int epx_c3_open(struct inode *inode, struct file *file)
        epx_c3_alive = 1;
        pr_info("Started watchdog timer\n");
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int epx_c3_release(struct inode *inode, struct file *file)
index a517d8b..3822a60 100644 (file)
@@ -75,7 +75,7 @@ static int fitpc2_wdt_open(struct inode *inode, struct file *file)
 
        wdt_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static ssize_t fitpc2_wdt_write(struct file *file, const char *data,
index e035a4d..3c2e935 100644 (file)
@@ -178,7 +178,7 @@ static int sc1200wdt_open(struct inode *inode, struct file *file)
        sc1200wdt_start();
        pr_info("Watchdog enabled, timeout = %d min(s)", timeout);
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 
index 403542f..4479741 100644 (file)
@@ -258,7 +258,7 @@ static int fop_open(struct inode *inode, struct file *file)
 
        /* Good, fire up the show */
        wdt_startup();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int fop_close(struct inode *inode, struct file *file)
index 814cdf5..ed6e9fa 100644 (file)
@@ -316,7 +316,7 @@ static int sch311x_wdt_open(struct inode *inode, struct file *file)
         *      Activate
         */
        sch311x_wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int sch311x_wdt_close(struct inode *inode, struct file *file)
index ec4063e..85f2d8e 100644 (file)
@@ -102,7 +102,7 @@ static int scx200_wdt_open(struct inode *inode, struct file *file)
                return -EBUSY;
        scx200_wdt_enable();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int scx200_wdt_release(struct inode *inode, struct file *file)
index c768dcd..a221707 100644 (file)
@@ -366,7 +366,7 @@ static int wb_smsc_wdt_open(struct inode *inode, struct file *file)
        pr_info("Watchdog enabled. Timeout set to %d %s\n",
                timeout, (unit == UNIT_SECOND) ? "second(s)" : "minute(s)");
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /* close => shut off the timer */
index db9b648..8dd953f 100644 (file)
@@ -224,7 +224,7 @@ static int fop_open(struct inode *inode, struct file *file)
 
        /* Good, fire up the show */
        wdt_startup();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int fop_close(struct inode *inode, struct file *file)
index 672b61a..184324c 100644 (file)
@@ -298,7 +298,7 @@ static int wdt_open(struct inode *inode, struct file *file)
                __module_get(THIS_MODULE);
 
        wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int wdt_release(struct inode *inode, struct file *file)
index 93c5b61..0a8073b 100644 (file)
@@ -197,7 +197,7 @@ static int wafwdt_open(struct inode *inode, struct file *file)
         *      Activate
         */
        wafwdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int wafwdt_close(struct inode *inode, struct file *file)
index f6c24b2..252a7c7 100644 (file)
@@ -825,7 +825,7 @@ static int watchdog_open(struct inode *inode, struct file *file)
                kref_get(&wd_data->kref);
 
        /* dev/watchdog is a virtual (and thus non-seekable) filesystem */
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 
 out_mod:
        module_put(wd_data->wdd->ops->owner);
index 0240c60..3c3ed51 100644 (file)
@@ -376,7 +376,7 @@ static int wdrtas_open(struct inode *inode, struct file *file)
        wdrtas_timer_start();
        wdrtas_timer_keepalive();
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
@@ -442,7 +442,7 @@ static ssize_t wdrtas_temp_read(struct file *file, char __user *buf,
  */
 static int wdrtas_temp_open(struct inode *inode, struct file *file)
 {
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
index e481fbb..3d2f5ed 100644 (file)
@@ -421,7 +421,7 @@ static int wdt_open(struct inode *inode, struct file *file)
         *      Activate
         */
        wdt_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
@@ -481,7 +481,7 @@ static ssize_t wdt_temp_read(struct file *file, char __user *buf,
 
 static int wdt_temp_open(struct inode *inode, struct file *file)
 {
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
index ebbb183..68843e7 100644 (file)
@@ -101,7 +101,7 @@ static int watchdog_open(struct inode *inode, struct file *file)
 
        ret = 0;
 #endif
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
        return ret;
 }
 
index a8e6f87..59ed644 100644 (file)
@@ -273,7 +273,7 @@ static int wdt977_open(struct inode *inode, struct file *file)
                __module_get(THIS_MODULE);
 
        wdt977_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 static int wdt977_release(struct inode *inode, struct file *file)
index 10e2cda..ff3a41f 100644 (file)
@@ -461,7 +461,7 @@ static int wdtpci_open(struct inode *inode, struct file *file)
         *      Activate
         */
        wdtpci_start();
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
@@ -524,7 +524,7 @@ static ssize_t wdtpci_temp_read(struct file *file, char __user *buf,
 
 static int wdtpci_temp_open(struct inode *inode, struct file *file)
 {
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 }
 
 /**
index 6d1a5e5..f341b01 100644 (file)
@@ -664,7 +664,7 @@ static int evtchn_open(struct inode *inode, struct file *filp)
 
        filp->private_data = u;
 
-       return nonseekable_open(inode, filp);
+       return stream_open(inode, filp);
 }
 
 static int evtchn_release(struct inode *inode, struct file *filp)
index 9859aba..3ff3212 100644 (file)
@@ -77,7 +77,7 @@ static int batadv_socket_open(struct inode *inode, struct file *file)
 
        batadv_debugfs_deprecated(file, "");
 
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
 
        socket_client = kmalloc(sizeof(*socket_client), GFP_KERNEL);
        if (!socket_client) {
index 3e610df..e8ff135 100644 (file)
@@ -102,7 +102,7 @@ static int batadv_log_open(struct inode *inode, struct file *file)
        batadv_debugfs_deprecated(file,
                                  "Use tracepoint batadv:batadv_dbg instead\n");
 
-       nonseekable_open(inode, file);
+       stream_open(inode, file);
        file->private_data = inode->i_private;
        return 0;
 }
index abca570..742e186 100644 (file)
@@ -1143,7 +1143,7 @@ static int rfkill_fop_open(struct inode *inode, struct file *file)
 
        file->private_data = data;
 
-       return nonseekable_open(inode, file);
+       return stream_open(inode, file);
 
  free:
        mutex_unlock(&data->mtx);
index fad7db4..a5cc9a8 100644 (file)
@@ -54,7 +54,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
        struct snd_ctl_file *ctl;
        int i, err;
 
-       err = nonseekable_open(inode, file);
+       err = stream_open(inode, file);
        if (err < 0)
                return err;
 
index c0690d1..4666bb3 100644 (file)
@@ -382,7 +382,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
        if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK))
                return -EINVAL;         /* invalid combination */
 
-       err = nonseekable_open(inode, file);
+       err = stream_open(inode, file);
        if (err < 0)
                return err;
 
index 38e7dea..a11bdc0 100644 (file)
@@ -307,7 +307,7 @@ static int snd_seq_open(struct inode *inode, struct file *file)
        struct snd_seq_user_client *user;
        int err;
 
-       err = nonseekable_open(inode, file);
+       err = stream_open(inode, file);
        if (err < 0)
                return err;
 
index 61a0cec..b842b61 100644 (file)
@@ -1425,7 +1425,7 @@ static int snd_timer_user_open(struct inode *inode, struct file *file)
        struct snd_timer_user *tu;
        int err;
 
-       err = nonseekable_open(inode, file);
+       err = stream_open(inode, file);
        if (err < 0)
                return err;