18 Feb, 2009
1 commit
-
&&/|| confusion
Signed-off-by: Roel Kluin
Cc: Bartlomiej Zolnierkiewicz
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe
21 Oct, 2008
6 commits
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both. That's this changeset.
2) for each driver convert to new methods. *ALL* drivers
are converted in this series.
3) kill the old (renamed) methods.Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain. The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.New methods:
open(bdev, mode)
release(disk, mode)
ioctl(bdev, mode, cmd, arg) /* Called without BKL */
compat_ioctl(bdev, mode, cmd, arg)
locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */Signed-off-by: Al Viro
-
... convert to it in callers
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
17 Oct, 2008
1 commit
-
Now that device_create() has been audited, rename things back to the
original call to be sane.Signed-off-by: Greg Kroah-Hartman
22 Jul, 2008
1 commit
-
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.Signed-off-by: Greg Kroah-Hartman
16 Jul, 2008
2 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
... -
pd_special_command uses blk_put_request with struct request on the
stack. As a result, blk_put_request needs a hack to catch a NULL
request_queue. This converts pd_special_command to use
blk_execute_rq.Signed-off-by: FUJITA Tomonori
Cc: Borislav Petkov
Signed-off-by: Jens Axboe
Signed-off-by: Bartlomiej Zolnierkiewicz
15 Jul, 2008
1 commit
-
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
IB/umad: BKL is not needed for ib_umad_open()
IB/uverbs: BKL is not needed for ib_uverbs_open()
bf561-coreb: BKL unneeded for open()
Call fasync() functions without the BKL
snd/PCM: fasync BKL pushdown
ipmi: fasync BKL pushdown
ecryptfs: fasync BKL pushdown
Bluetooth VHCI: fasync BKL pushdown
tty_io: fasync BKL pushdown
tun: fasync BKL pushdown
i2o: fasync BKL pushdown
mpt: fasync BKL pushdown
Remove BKL from remote_llseek v2
Make FAT users happier by not deadlocking
x86-mce: BKL pushdown
vmwatchdog: BKL pushdown
vmcp: BKL pushdown
via-pmu: BKL pushdown
uml-random: BKL pushdown
uml-mmapper: BKL pushdown
...
04 Jul, 2008
1 commit
-
Leaves us with lock_kernel for two methods. Also remove a bogus printk
with no printk level and return -ENOTTY not -EINVAL for correctness.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton(Jens: added smp_lock.h include to pt.c, otherwise it wont compile because
of missing {un}lock_kernel() definition)Signed-off-by: Jens Axboe
21 Jun, 2008
1 commit
-
Signed-off-by: Jonathan Corbet
29 Apr, 2008
1 commit
-
Any path needs to call it to initialize the request.
This is a preparation for large command support, which needs to
initialize the request in a proper way (that is, just doing a memset()
will not work).Signed-off-by: FUJITA Tomonori
Cc: Jens Axboe
Signed-off-by: Jens Axboe
07 Feb, 2008
1 commit
-
Fix various instances of
if (!expr & mask)
which should probably have been
if (!(expr & mask))
Signed-off-by: Alexey Dobriyan
Cc: Jens Axboe
Cc: Peter Osterlund
Cc: Karsten Keil
Cc: Mauro Carvalho Chehab
Cc: "Antonino A. Daplas"
Cc: Mark Fasheh
Cc: "David S. Miller"
Cc: Jeff Garzik
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jan, 2008
1 commit
-
struct class_device is going away, this converts the code to use struct
device instead.Signed-off-by: Tony Jones
Cc: Tim Waugh
Cc: Jens Axboe
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
15 Nov, 2007
1 commit
-
The pf driver for parallel port floppy drives seems to be broken. At least
with Imation SuperDisk with EPAT chip, the driver calls pi_connect() and
pi_disconnect after each transferred sector. At least with EPAT, this
operation is very expensive - causes drive recalibration. Thus, transferring
even a single byte (dd if=/dev/pf0 of=/dev/null bs=1 count=1) takes 20
seconds, making the driver useless.The pf_next_buf() function seems to be broken as it returns 1 always (except
when pf_run is non-zero), causing the loop in do_pf_read_drq (and
do_pf_write_drq) to be executed only once.The following patch fixes this problem. It also fixes swapped descriptions in
pf_lock() function and removes DBMSG macro, which seems useless.Signed-off-by: Ondrej Zary
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Nov, 2007
1 commit
-
Fix 'and' typo (PT_WRITE_OK is defined 2)
Signed-off-by: Roel Kluin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jul, 2007
1 commit
-
Some of the code has been gradually transitioned to using the proper
struct request_queue, but there's lots left. So do a full sweet of
the kernel and get rid of this typedef and replace its uses with
the proper type.Signed-off-by: Jens Axboe
24 Apr, 2007
1 commit
-
pcd_lock and pf_spin_lock are passed to blk_init_queue() which, seeing them
as valid lock pointer, sets it as ->queue_lock.The problem is that pcd_lock and pf_spin_lock aren't initialized anywhere.
Signed-off-by: Alexey Dobriyan
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Mar, 2007
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
15 Feb, 2007
1 commit
-
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).Signed-off-by: Tim Schmielau
Acked-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
1 commit
-
Remove the unused kernel config option PARIDE_PARPORT.
Signed-off-by: Robert P. J. Day
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
5 commits
-
Let's remove this pre-historic paride building script.
Signed-off-by: Adrian Bunk
Acked-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
CONFIG_PARIDE depends on CONFIG_PARPORT_PC, so there's no reason for
these #ifdef's.Signed-off-by: Adrian Bunk
Acked-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch makes module init return proper value instead of -1 (-EPERM).
Cc: Tim Waugh
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
paride_register() returns 1 on success, 0 on failure and module init
code looks likestatic int __init foo_init(void)
{
return paride_register(&foo) - 1;
}which is not what one get used to. Converted to usual 0/-E convention.
In case of kbic driver, unwind registration. It was just
return (paride_register(&k951)||paride_register(&k971))-1;
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We're about to change the semantics of pi_register()'s return value, so
rename it to something else first, so that any unconverted code reliaby
breaks.Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Nov, 2006
1 commit
-
Fix up for make allyesconfig.
Signed-Off-By: David Howells
01 Oct, 2006
4 commits
-
All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACKSigned-off-by: Peter Zijlstra
Acked-by: Ingo Molnar
Acked-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
After Christophs SCSI change, the only usage left is RQ_ACTIVE
and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing
the request, so any check for RQ_INACTIVE in a driver is a bug and
indicates use-after-free.So kill/clean the remaining users, straight forward.
Signed-off-by: Jens Axboe
-
As the comments indicates in blkdev.h, we can fold it into ->end_io_data
usage as that is really what ->waiting is. Fixup the users of
blk_end_sync_rq().Signed-off-by: Jens Axboe
-
Right now ->flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
->cmd_type and ->cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.Signed-off-by: Jens Axboe
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
30 Jun, 2006
2 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits)
[PATCH] devfs: Remove it from the feature_removal.txt file
[PATCH] devfs: Last little devfs cleanups throughout the kernel tree.
[PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
[PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed
[PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed
[PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed
[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
[PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed
[PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree
[PATCH] devfs: Remove devfs_remove() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree
[PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree
[PATCH] devfs: Remove devfs support from the sound subsystem
[PATCH] devfs: Remove devfs support from the ide subsystem.
[PATCH] devfs: Remove devfs support from the serial subsystem
[PATCH] devfs: Remove devfs from the init code
[PATCH] devfs: Remove devfs from the partition code
... -
Another possible dereference detected by coverity (id #759). pf_probe()
might call pf_identify() which might call get_capacity() which dereferences
pf->diskSigned-off-by: Eric Sesterhenn
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Jun, 2006
2 commits
-
Also fixes up all files that #include it.
Signed-off-by: Greg Kroah-Hartman
-
Removes the devfs_remove() function and all callers of it.
Signed-off-by: Greg Kroah-Hartman