diff options
| -rw-r--r-- | arch/mn10300/kernel/module.c | 35 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/mpic.c | 2 | ||||
| -rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 2 | ||||
| -rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 7 | ||||
| -rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 7 | ||||
| -rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 20 | ||||
| -rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/aacraid/linit.c | 4 | ||||
| -rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/scsi_error.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/scsi_lib.c | 23 | ||||
| -rw-r--r-- | drivers/scsi/stex.c | 2 | ||||
| -rw-r--r-- | include/linux/security.h | 12 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_fc.h | 2 | ||||
| -rw-r--r-- | mm/backing-dev.c | 3 | ||||
| -rw-r--r-- | mm/swap.c | 7 |
17 files changed, 68 insertions, 68 deletions
diff --git a/arch/mn10300/kernel/module.c b/arch/mn10300/kernel/module.c index 8fa36893df7a..6b287f2e8e84 100644 --- a/arch/mn10300/kernel/module.c +++ b/arch/mn10300/kernel/module.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* MN10300 Kernel module helper routines | 1 | /* MN10300 Kernel module helper routines |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by Mark Salter (msalter@redhat.com) | 4 | * Written by Mark Salter (msalter@redhat.com) |
| 5 | * - Derived from arch/i386/kernel/module.c | 5 | * - Derived from arch/i386/kernel/module.c |
| 6 | * | 6 | * |
| @@ -64,21 +64,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
| 64 | return 0; | 64 | return 0; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | static uint32_t reloc_get16(uint8_t *p) | ||
| 68 | { | ||
| 69 | return p[0] | (p[1] << 8); | ||
| 70 | } | ||
| 71 | |||
| 72 | static uint32_t reloc_get24(uint8_t *p) | ||
| 73 | { | ||
| 74 | return reloc_get16(p) | (p[2] << 16); | ||
| 75 | } | ||
| 76 | |||
| 77 | static uint32_t reloc_get32(uint8_t *p) | ||
| 78 | { | ||
| 79 | return reloc_get16(p) | (reloc_get16(p+2) << 16); | ||
| 80 | } | ||
| 81 | |||
| 82 | static void reloc_put16(uint8_t *p, uint32_t val) | 67 | static void reloc_put16(uint8_t *p, uint32_t val) |
| 83 | { | 68 | { |
| 84 | p[0] = val & 0xff; | 69 | p[0] = val & 0xff; |
| @@ -144,25 +129,19 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
| 144 | relocation = sym->st_value + rel[i].r_addend; | 129 | relocation = sym->st_value + rel[i].r_addend; |
| 145 | 130 | ||
| 146 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 131 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
| 147 | /* for the first four relocation types, we add the | 132 | /* for the first four relocation types, we simply |
| 148 | * adjustment into the value at the location given */ | 133 | * store the adjustment at the location given */ |
| 149 | case R_MN10300_32: | 134 | case R_MN10300_32: |
| 150 | value = reloc_get32(location); | 135 | reloc_put32(location, relocation); |
| 151 | value += relocation; | ||
| 152 | reloc_put32(location, value); | ||
| 153 | break; | 136 | break; |
| 154 | case R_MN10300_24: | 137 | case R_MN10300_24: |
| 155 | value = reloc_get24(location); | 138 | reloc_put24(location, relocation); |
| 156 | value += relocation; | ||
| 157 | reloc_put24(location, value); | ||
| 158 | break; | 139 | break; |
| 159 | case R_MN10300_16: | 140 | case R_MN10300_16: |
| 160 | value = reloc_get16(location); | 141 | reloc_put16(location, relocation); |
| 161 | value += relocation; | ||
| 162 | reloc_put16(location, value); | ||
| 163 | break; | 142 | break; |
| 164 | case R_MN10300_8: | 143 | case R_MN10300_8: |
| 165 | *location += relocation; | 144 | *location = relocation; |
| 166 | break; | 145 | break; |
| 167 | 146 | ||
| 168 | /* for the next three relocation types, we write the | 147 | /* for the next three relocation types, we write the |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index b24e1d085557..1890fb085cde 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq) | |||
| 600 | cpuid = first_cpu(tmp); | 600 | cpuid = first_cpu(tmp); |
| 601 | } | 601 | } |
| 602 | 602 | ||
| 603 | return cpuid; | 603 | return get_hard_smp_processor_id(cpuid); |
| 604 | } | 604 | } |
| 605 | #else | 605 | #else |
| 606 | static int irq_choose_cpu(unsigned int virt_irq) | 606 | static int irq_choose_cpu(unsigned int virt_irq) |
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 5c027b6b4e5a..650983806392 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
| @@ -481,7 +481,7 @@ struct vm_operations_struct gru_vm_ops = { | |||
| 481 | .fault = gru_fault, | 481 | .fault = gru_fault, |
| 482 | }; | 482 | }; |
| 483 | 483 | ||
| 484 | module_init(gru_init); | 484 | fs_initcall(gru_init); |
| 485 | module_exit(gru_exit); | 485 | module_exit(gru_exit); |
| 486 | 486 | ||
| 487 | module_param(gru_options, ulong, 0644); | 487 | module_param(gru_options, ulong, 0644); |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 35364f64da7f..c557ba34e1aa 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
| @@ -720,7 +720,6 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act, | |||
| 720 | goto failed_openfcp; | 720 | goto failed_openfcp; |
| 721 | 721 | ||
| 722 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status); | 722 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status); |
| 723 | schedule_work(&act->adapter->scan_work); | ||
| 724 | 723 | ||
| 725 | return ZFCP_ERP_SUCCEEDED; | 724 | return ZFCP_ERP_SUCCEEDED; |
| 726 | 725 | ||
| @@ -1186,7 +1185,9 @@ static void zfcp_erp_scsi_scan(struct work_struct *work) | |||
| 1186 | container_of(work, struct zfcp_erp_add_work, work); | 1185 | container_of(work, struct zfcp_erp_add_work, work); |
| 1187 | struct zfcp_unit *unit = p->unit; | 1186 | struct zfcp_unit *unit = p->unit; |
| 1188 | struct fc_rport *rport = unit->port->rport; | 1187 | struct fc_rport *rport = unit->port->rport; |
| 1189 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | 1188 | |
| 1189 | if (rport && rport->port_state == FC_PORTSTATE_ONLINE) | ||
| 1190 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | ||
| 1190 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); | 1191 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); |
| 1191 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); | 1192 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); |
| 1192 | zfcp_unit_put(unit); | 1193 | zfcp_unit_put(unit); |
| @@ -1282,6 +1283,8 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result) | |||
| 1282 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: | 1283 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: |
| 1283 | if (result != ZFCP_ERP_SUCCEEDED) | 1284 | if (result != ZFCP_ERP_SUCCEEDED) |
| 1284 | zfcp_erp_rports_del(adapter); | 1285 | zfcp_erp_rports_del(adapter); |
| 1286 | else | ||
| 1287 | schedule_work(&adapter->scan_work); | ||
| 1285 | zfcp_adapter_put(adapter); | 1288 | zfcp_adapter_put(adapter); |
| 1286 | break; | 1289 | break; |
| 1287 | } | 1290 | } |
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 1a7c80a77ff5..8aab3091a7b1 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
| @@ -50,7 +50,8 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port) | |||
| 50 | if (mutex_lock_interruptible(&wka_port->mutex)) | 50 | if (mutex_lock_interruptible(&wka_port->mutex)) |
| 51 | return -ERESTARTSYS; | 51 | return -ERESTARTSYS; |
| 52 | 52 | ||
| 53 | if (wka_port->status != ZFCP_WKA_PORT_ONLINE) { | 53 | if (wka_port->status == ZFCP_WKA_PORT_OFFLINE || |
| 54 | wka_port->status == ZFCP_WKA_PORT_CLOSING) { | ||
| 54 | wka_port->status = ZFCP_WKA_PORT_OPENING; | 55 | wka_port->status = ZFCP_WKA_PORT_OPENING; |
| 55 | if (zfcp_fsf_open_wka_port(wka_port)) | 56 | if (zfcp_fsf_open_wka_port(wka_port)) |
| 56 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 57 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; |
| @@ -125,8 +126,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | |||
| 125 | 126 | ||
| 126 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 127 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
| 127 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { | 128 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { |
| 128 | /* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */ | 129 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN)) |
| 129 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID)) | ||
| 130 | /* Try to connect to unused ports anyway. */ | 130 | /* Try to connect to unused ports anyway. */ |
| 131 | zfcp_erp_port_reopen(port, | 131 | zfcp_erp_port_reopen(port, |
| 132 | ZFCP_STATUS_COMMON_ERP_FAILED, | 132 | ZFCP_STATUS_COMMON_ERP_FAILED, |
| @@ -610,7 +610,6 @@ int zfcp_scan_ports(struct zfcp_adapter *adapter) | |||
| 610 | int ret, i; | 610 | int ret, i; |
| 611 | struct zfcp_gpn_ft *gpn_ft; | 611 | struct zfcp_gpn_ft *gpn_ft; |
| 612 | 612 | ||
| 613 | zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */ | ||
| 614 | if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT) | 613 | if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT) |
| 615 | return 0; | 614 | return 0; |
| 616 | 615 | ||
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index d024442ee128..dc0367690405 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
| @@ -930,8 +930,10 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id, | |||
| 930 | goto out; | 930 | goto out; |
| 931 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, | 931 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, |
| 932 | req_flags, adapter->pool.fsf_req_abort); | 932 | req_flags, adapter->pool.fsf_req_abort); |
| 933 | if (IS_ERR(req)) | 933 | if (IS_ERR(req)) { |
| 934 | req = NULL; | ||
| 934 | goto out; | 935 | goto out; |
| 936 | } | ||
| 935 | 937 | ||
| 936 | if (unlikely(!(atomic_read(&unit->status) & | 938 | if (unlikely(!(atomic_read(&unit->status) & |
| 937 | ZFCP_STATUS_COMMON_UNBLOCKED))) | 939 | ZFCP_STATUS_COMMON_UNBLOCKED))) |
| @@ -1584,6 +1586,7 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) | |||
| 1584 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 1586 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; |
| 1585 | break; | 1587 | break; |
| 1586 | case FSF_PORT_ALREADY_OPEN: | 1588 | case FSF_PORT_ALREADY_OPEN: |
| 1589 | break; | ||
| 1587 | case FSF_GOOD: | 1590 | case FSF_GOOD: |
| 1588 | wka_port->handle = header->port_handle; | 1591 | wka_port->handle = header->port_handle; |
| 1589 | wka_port->status = ZFCP_WKA_PORT_ONLINE; | 1592 | wka_port->status = ZFCP_WKA_PORT_ONLINE; |
| @@ -2113,18 +2116,21 @@ static inline void zfcp_fsf_trace_latency(struct zfcp_fsf_req *fsf_req) | |||
| 2113 | 2116 | ||
| 2114 | static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req) | 2117 | static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req) |
| 2115 | { | 2118 | { |
| 2116 | struct scsi_cmnd *scpnt = req->data; | 2119 | struct scsi_cmnd *scpnt; |
| 2117 | struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *) | 2120 | struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *) |
| 2118 | &(req->qtcb->bottom.io.fcp_rsp); | 2121 | &(req->qtcb->bottom.io.fcp_rsp); |
| 2119 | u32 sns_len; | 2122 | u32 sns_len; |
| 2120 | char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1]; | 2123 | char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1]; |
| 2121 | unsigned long flags; | 2124 | unsigned long flags; |
| 2122 | 2125 | ||
| 2123 | if (unlikely(!scpnt)) | ||
| 2124 | return; | ||
| 2125 | |||
| 2126 | read_lock_irqsave(&req->adapter->abort_lock, flags); | 2126 | read_lock_irqsave(&req->adapter->abort_lock, flags); |
| 2127 | 2127 | ||
| 2128 | scpnt = req->data; | ||
| 2129 | if (unlikely(!scpnt)) { | ||
| 2130 | read_unlock_irqrestore(&req->adapter->abort_lock, flags); | ||
| 2131 | return; | ||
| 2132 | } | ||
| 2133 | |||
| 2128 | if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) { | 2134 | if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) { |
| 2129 | set_host_byte(scpnt, DID_SOFT_ERROR); | 2135 | set_host_byte(scpnt, DID_SOFT_ERROR); |
| 2130 | set_driver_byte(scpnt, SUGGEST_RETRY); | 2136 | set_driver_byte(scpnt, SUGGEST_RETRY); |
| @@ -2442,8 +2448,10 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter, | |||
| 2442 | goto out; | 2448 | goto out; |
| 2443 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, | 2449 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, |
| 2444 | adapter->pool.fsf_req_scsi); | 2450 | adapter->pool.fsf_req_scsi); |
| 2445 | if (IS_ERR(req)) | 2451 | if (IS_ERR(req)) { |
| 2452 | req = NULL; | ||
| 2446 | goto out; | 2453 | goto out; |
| 2454 | } | ||
| 2447 | 2455 | ||
| 2448 | req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT; | 2456 | req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT; |
| 2449 | req->data = unit; | 2457 | req->data = unit; |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index e46fd3e9f68f..468c880f8b6d 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
| @@ -88,7 +88,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt, | |||
| 88 | ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0, | 88 | ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0, |
| 89 | ZFCP_REQ_AUTO_CLEANUP); | 89 | ZFCP_REQ_AUTO_CLEANUP); |
| 90 | if (unlikely(ret == -EBUSY)) | 90 | if (unlikely(ret == -EBUSY)) |
| 91 | zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT); | 91 | return SCSI_MLQUEUE_DEVICE_BUSY; |
| 92 | else if (unlikely(ret < 0)) | 92 | else if (unlikely(ret < 0)) |
| 93 | return SCSI_MLQUEUE_HOST_BUSY; | 93 | return SCSI_MLQUEUE_HOST_BUSY; |
| 94 | 94 | ||
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 9aa301c1ed07..162cd927d94b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
| @@ -427,8 +427,8 @@ static int aac_slave_configure(struct scsi_device *sdev) | |||
| 427 | * Firmware has an individual device recovery time typically | 427 | * Firmware has an individual device recovery time typically |
| 428 | * of 35 seconds, give us a margin. | 428 | * of 35 seconds, give us a margin. |
| 429 | */ | 429 | */ |
| 430 | if (sdev->timeout < (45 * HZ)) | 430 | if (sdev->request_queue->rq_timeout < (45 * HZ)) |
| 431 | sdev->timeout = 45 * HZ; | 431 | blk_queue_rq_timeout(sdev->request_queue, 45*HZ); |
| 432 | for (cid = 0; cid < aac->maximum_num_containers; ++cid) | 432 | for (cid = 0; cid < aac->maximum_num_containers; ++cid) |
| 433 | if (aac->fsa_dev[cid].valid) | 433 | if (aac->fsa_dev[cid].valid) |
| 434 | ++num_lsu; | 434 | ++num_lsu; |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 87e09f35d3d4..6cad1758243a 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
| @@ -1442,7 +1442,7 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev) | |||
| 1442 | spin_lock_irqsave(shost->host_lock, lock_flags); | 1442 | spin_lock_irqsave(shost->host_lock, lock_flags); |
| 1443 | if (sdev->type == TYPE_DISK) { | 1443 | if (sdev->type == TYPE_DISK) { |
| 1444 | sdev->allow_restart = 1; | 1444 | sdev->allow_restart = 1; |
| 1445 | sdev->timeout = 60 * HZ; | 1445 | blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); |
| 1446 | } | 1446 | } |
| 1447 | scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun); | 1447 | scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun); |
| 1448 | spin_unlock_irqrestore(shost->host_lock, lock_flags); | 1448 | spin_unlock_irqrestore(shost->host_lock, lock_flags); |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index a454f94623d7..17ce7abe17ee 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
| @@ -1016,7 +1016,8 @@ static int megasas_slave_configure(struct scsi_device *sdev) | |||
| 1016 | * The RAID firmware may require extended timeouts. | 1016 | * The RAID firmware may require extended timeouts. |
| 1017 | */ | 1017 | */ |
| 1018 | if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS) | 1018 | if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS) |
| 1019 | sdev->timeout = MEGASAS_DEFAULT_CMD_TIMEOUT * HZ; | 1019 | blk_queue_rq_timeout(sdev->request_queue, |
| 1020 | MEGASAS_DEFAULT_CMD_TIMEOUT * HZ); | ||
| 1020 | return 0; | 1021 | return 0; |
| 1021 | } | 1022 | } |
| 1022 | 1023 | ||
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 386361778ebb..edfaf241c5ba 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
| @@ -932,8 +932,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd) | |||
| 932 | int i, rtn = NEEDS_RETRY; | 932 | int i, rtn = NEEDS_RETRY; |
| 933 | 933 | ||
| 934 | for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) | 934 | for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) |
| 935 | rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, | 935 | rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); |
| 936 | scmd->device->timeout, 0); | ||
| 937 | 936 | ||
| 938 | if (rtn == SUCCESS) | 937 | if (rtn == SUCCESS) |
| 939 | return 0; | 938 | return 0; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f5d3b96890dc..fa45a1a66867 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -567,15 +567,18 @@ static inline int scsi_host_is_busy(struct Scsi_Host *shost) | |||
| 567 | */ | 567 | */ |
| 568 | static void scsi_run_queue(struct request_queue *q) | 568 | static void scsi_run_queue(struct request_queue *q) |
| 569 | { | 569 | { |
| 570 | struct scsi_device *starved_head = NULL, *sdev = q->queuedata; | 570 | struct scsi_device *sdev = q->queuedata; |
| 571 | struct Scsi_Host *shost = sdev->host; | 571 | struct Scsi_Host *shost = sdev->host; |
| 572 | LIST_HEAD(starved_list); | ||
| 572 | unsigned long flags; | 573 | unsigned long flags; |
| 573 | 574 | ||
| 574 | if (scsi_target(sdev)->single_lun) | 575 | if (scsi_target(sdev)->single_lun) |
| 575 | scsi_single_lun_run(sdev); | 576 | scsi_single_lun_run(sdev); |
| 576 | 577 | ||
| 577 | spin_lock_irqsave(shost->host_lock, flags); | 578 | spin_lock_irqsave(shost->host_lock, flags); |
| 578 | while (!list_empty(&shost->starved_list) && !scsi_host_is_busy(shost)) { | 579 | list_splice_init(&shost->starved_list, &starved_list); |
| 580 | |||
| 581 | while (!list_empty(&starved_list)) { | ||
| 579 | int flagset; | 582 | int flagset; |
| 580 | 583 | ||
| 581 | /* | 584 | /* |
| @@ -588,24 +591,18 @@ static void scsi_run_queue(struct request_queue *q) | |||
| 588 | * scsi_request_fn must get the host_lock before checking | 591 | * scsi_request_fn must get the host_lock before checking |
| 589 | * or modifying starved_list or starved_entry. | 592 | * or modifying starved_list or starved_entry. |
| 590 | */ | 593 | */ |
| 591 | sdev = list_entry(shost->starved_list.next, | 594 | if (scsi_host_is_busy(shost)) |
| 592 | struct scsi_device, starved_entry); | ||
| 593 | /* | ||
| 594 | * The *queue_ready functions can add a device back onto the | ||
| 595 | * starved list's tail, so we must check for a infinite loop. | ||
| 596 | */ | ||
| 597 | if (sdev == starved_head) | ||
| 598 | break; | 595 | break; |
| 599 | if (!starved_head) | ||
| 600 | starved_head = sdev; | ||
| 601 | 596 | ||
| 597 | sdev = list_entry(starved_list.next, | ||
| 598 | struct scsi_device, starved_entry); | ||
| 599 | list_del_init(&sdev->starved_entry); | ||
| 602 | if (scsi_target_is_busy(scsi_target(sdev))) { | 600 | if (scsi_target_is_busy(scsi_target(sdev))) { |
| 603 | list_move_tail(&sdev->starved_entry, | 601 | list_move_tail(&sdev->starved_entry, |
| 604 | &shost->starved_list); | 602 | &shost->starved_list); |
| 605 | continue; | 603 | continue; |
| 606 | } | 604 | } |
| 607 | 605 | ||
| 608 | list_del_init(&sdev->starved_entry); | ||
| 609 | spin_unlock(shost->host_lock); | 606 | spin_unlock(shost->host_lock); |
| 610 | 607 | ||
| 611 | spin_lock(sdev->request_queue->queue_lock); | 608 | spin_lock(sdev->request_queue->queue_lock); |
| @@ -621,6 +618,8 @@ static void scsi_run_queue(struct request_queue *q) | |||
| 621 | 618 | ||
| 622 | spin_lock(shost->host_lock); | 619 | spin_lock(shost->host_lock); |
| 623 | } | 620 | } |
| 621 | /* put any unprocessed entries back */ | ||
| 622 | list_splice(&starved_list, &shost->starved_list); | ||
| 624 | spin_unlock_irqrestore(shost->host_lock, flags); | 623 | spin_unlock_irqrestore(shost->host_lock, flags); |
| 625 | 624 | ||
| 626 | blk_run_queue(q); | 625 | blk_run_queue(q); |
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 3790906a77d1..2fa830c0be27 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c | |||
| @@ -477,7 +477,7 @@ stex_slave_config(struct scsi_device *sdev) | |||
| 477 | { | 477 | { |
| 478 | sdev->use_10_for_rw = 1; | 478 | sdev->use_10_for_rw = 1; |
| 479 | sdev->use_10_for_ms = 1; | 479 | sdev->use_10_for_ms = 1; |
| 480 | sdev->timeout = 60 * HZ; | 480 | blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); |
| 481 | sdev->tagged_supported = 1; | 481 | sdev->tagged_supported = 1; |
| 482 | 482 | ||
| 483 | return 0; | 483 | return 0; |
diff --git a/include/linux/security.h b/include/linux/security.h index c13f1cec9abb..e3d4ecda2673 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1818,17 +1818,21 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz) | |||
| 1818 | 1818 | ||
| 1819 | static inline int security_vm_enough_memory(long pages) | 1819 | static inline int security_vm_enough_memory(long pages) |
| 1820 | { | 1820 | { |
| 1821 | WARN_ON(current->mm == NULL); | ||
| 1821 | return cap_vm_enough_memory(current->mm, pages); | 1822 | return cap_vm_enough_memory(current->mm, pages); |
| 1822 | } | 1823 | } |
| 1823 | 1824 | ||
| 1824 | static inline int security_vm_enough_memory_kern(long pages) | 1825 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
| 1825 | { | 1826 | { |
| 1826 | return cap_vm_enough_memory(current->mm, pages); | 1827 | WARN_ON(mm == NULL); |
| 1828 | return cap_vm_enough_memory(mm, pages); | ||
| 1827 | } | 1829 | } |
| 1828 | 1830 | ||
| 1829 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 1831 | static inline int security_vm_enough_memory_kern(long pages) |
| 1830 | { | 1832 | { |
| 1831 | return cap_vm_enough_memory(mm, pages); | 1833 | /* If current->mm is a kernel thread then we will pass NULL, |
| 1834 | for this specific case that is fine */ | ||
| 1835 | return cap_vm_enough_memory(current->mm, pages); | ||
| 1832 | } | 1836 | } |
| 1833 | 1837 | ||
| 1834 | static inline int security_bprm_alloc(struct linux_binprm *bprm) | 1838 | static inline int security_bprm_alloc(struct linux_binprm *bprm) |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 49d8913c4f86..6e04e6fe79c7 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
| @@ -357,7 +357,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
| 357 | /* bit field values for struct fc_rport "flags" field: */ | 357 | /* bit field values for struct fc_rport "flags" field: */ |
| 358 | #define FC_RPORT_DEVLOSS_PENDING 0x01 | 358 | #define FC_RPORT_DEVLOSS_PENDING 0x01 |
| 359 | #define FC_RPORT_SCAN_PENDING 0x02 | 359 | #define FC_RPORT_SCAN_PENDING 0x02 |
| 360 | #define FC_RPORT_FAST_FAIL_TIMEDOUT 0x03 | 360 | #define FC_RPORT_FAST_FAIL_TIMEDOUT 0x04 |
| 361 | 361 | ||
| 362 | #define dev_to_rport(d) \ | 362 | #define dev_to_rport(d) \ |
| 363 | container_of(d, struct fc_rport, dev) | 363 | container_of(d, struct fc_rport, dev) |
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index f2e574dbc300..2a56124dbc28 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
| @@ -176,6 +176,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 176 | int ret = 0; | 176 | int ret = 0; |
| 177 | struct device *dev; | 177 | struct device *dev; |
| 178 | 178 | ||
| 179 | if (WARN_ON(bdi->dev)) | ||
| 180 | goto exit; | ||
| 181 | |||
| 179 | va_start(args, fmt); | 182 | va_start(args, fmt); |
| 180 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); | 183 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); |
| 181 | va_end(args); | 184 | va_end(args); |
| @@ -445,6 +445,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
| 445 | for (i = 0; i < pagevec_count(pvec); i++) { | 445 | for (i = 0; i < pagevec_count(pvec); i++) { |
| 446 | struct page *page = pvec->pages[i]; | 446 | struct page *page = pvec->pages[i]; |
| 447 | struct zone *pagezone = page_zone(page); | 447 | struct zone *pagezone = page_zone(page); |
| 448 | int file; | ||
| 448 | 449 | ||
| 449 | if (pagezone != zone) { | 450 | if (pagezone != zone) { |
| 450 | if (zone) | 451 | if (zone) |
| @@ -456,8 +457,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
| 456 | VM_BUG_ON(PageUnevictable(page)); | 457 | VM_BUG_ON(PageUnevictable(page)); |
| 457 | VM_BUG_ON(PageLRU(page)); | 458 | VM_BUG_ON(PageLRU(page)); |
| 458 | SetPageLRU(page); | 459 | SetPageLRU(page); |
| 459 | if (is_active_lru(lru)) | 460 | file = is_file_lru(lru); |
| 461 | zone->recent_scanned[file]++; | ||
| 462 | if (is_active_lru(lru)) { | ||
| 460 | SetPageActive(page); | 463 | SetPageActive(page); |
| 464 | zone->recent_rotated[file]++; | ||
| 465 | } | ||
| 461 | add_page_to_lru_list(zone, page, lru); | 466 | add_page_to_lru_list(zone, page, lru); |
| 462 | } | 467 | } |
| 463 | if (zone) | 468 | if (zone) |
