mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe: "A few small, but important fixes. Most of them are marked for stable as well - Fix failure to release a semaphore on error path in mtip32xx. - Fix crashable condition in bio_get_nr_vecs(). - Don't mark end-of-disk buffers as mapped, limit it to i_size. - Fix for build problem with CONFIG_BLOCK=n on arm at least. - Fix for a buffer overlow on UUID partition printing. - Trivial removal of unused variables in dac960." * 'for-linus' of git://git.kernel.dk/linux-block: block: fix buffer overflow when printing partition UUIDs Fix blkdev.h build errors when BLOCK=n bio allocation failure due to bio_get_nr_vecs() block: don't mark buffers beyond end of disk as mapped mtip32xx: release the semaphore on an error path dac960: Remove unused variables from DAC960_CreateProcEntries()
This commit is contained in:
commit
14e931a264
9 changed files with 34 additions and 30 deletions
|
|
@ -6580,24 +6580,21 @@ static const struct file_operations dac960_user_command_proc_fops = {
|
|||
|
||||
static void DAC960_CreateProcEntries(DAC960_Controller_T *Controller)
|
||||
{
|
||||
struct proc_dir_entry *StatusProcEntry;
|
||||
struct proc_dir_entry *ControllerProcEntry;
|
||||
struct proc_dir_entry *UserCommandProcEntry;
|
||||
|
||||
if (DAC960_ProcDirectoryEntry == NULL) {
|
||||
DAC960_ProcDirectoryEntry = proc_mkdir("rd", NULL);
|
||||
StatusProcEntry = proc_create("status", 0,
|
||||
DAC960_ProcDirectoryEntry,
|
||||
&dac960_proc_fops);
|
||||
DAC960_ProcDirectoryEntry = proc_mkdir("rd", NULL);
|
||||
proc_create("status", 0, DAC960_ProcDirectoryEntry,
|
||||
&dac960_proc_fops);
|
||||
}
|
||||
|
||||
sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber);
|
||||
ControllerProcEntry = proc_mkdir(Controller->ControllerName,
|
||||
DAC960_ProcDirectoryEntry);
|
||||
proc_create_data("initial_status", 0, ControllerProcEntry, &dac960_initial_status_proc_fops, Controller);
|
||||
proc_create_data("current_status", 0, ControllerProcEntry, &dac960_current_status_proc_fops, Controller);
|
||||
UserCommandProcEntry = proc_create_data("user_command", S_IWUSR | S_IRUSR, ControllerProcEntry, &dac960_user_command_proc_fops, Controller);
|
||||
Controller->ControllerProcEntry = ControllerProcEntry;
|
||||
sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber);
|
||||
ControllerProcEntry = proc_mkdir(Controller->ControllerName,
|
||||
DAC960_ProcDirectoryEntry);
|
||||
proc_create_data("initial_status", 0, ControllerProcEntry, &dac960_initial_status_proc_fops, Controller);
|
||||
proc_create_data("current_status", 0, ControllerProcEntry, &dac960_current_status_proc_fops, Controller);
|
||||
proc_create_data("user_command", S_IWUSR | S_IRUSR, ControllerProcEntry, &dac960_user_command_proc_fops, Controller);
|
||||
Controller->ControllerProcEntry = ControllerProcEntry;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
|
|||
up(&dd->port->cmd_slot);
|
||||
return NULL;
|
||||
}
|
||||
if (unlikely(*tag < 0))
|
||||
if (unlikely(*tag < 0)) {
|
||||
up(&dd->port->cmd_slot);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return dd->port->commands[*tag].sg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue