Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119596
b: refs/heads/master
c: e2e2983
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 2, 2008
1 parent 86662ec commit f93364f
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95964018d53f479529dfdc2b46fe30c0a14a00e0
refs/heads/master: e2e29831cc463f4be61d4e36b8699ae7e071a685
35 changes: 7 additions & 28 deletions trunk/arch/mn10300/kernel/module.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* MN10300 Kernel module helper routines
*
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved.
* Written by Mark Salter (msalter@redhat.com)
* - Derived from arch/i386/kernel/module.c
*
Expand Down Expand Up @@ -64,21 +64,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
return 0;
}

static uint32_t reloc_get16(uint8_t *p)
{
return p[0] | (p[1] << 8);
}

static uint32_t reloc_get24(uint8_t *p)
{
return reloc_get16(p) | (p[2] << 16);
}

static uint32_t reloc_get32(uint8_t *p)
{
return reloc_get16(p) | (reloc_get16(p+2) << 16);
}

static void reloc_put16(uint8_t *p, uint32_t val)
{
p[0] = val & 0xff;
Expand Down Expand Up @@ -144,25 +129,19 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
relocation = sym->st_value + rel[i].r_addend;

switch (ELF32_R_TYPE(rel[i].r_info)) {
/* for the first four relocation types, we add the
* adjustment into the value at the location given */
/* for the first four relocation types, we simply
* store the adjustment at the location given */
case R_MN10300_32:
value = reloc_get32(location);
value += relocation;
reloc_put32(location, value);
reloc_put32(location, relocation);
break;
case R_MN10300_24:
value = reloc_get24(location);
value += relocation;
reloc_put24(location, value);
reloc_put24(location, relocation);
break;
case R_MN10300_16:
value = reloc_get16(location);
value += relocation;
reloc_put16(location, value);
reloc_put16(location, relocation);
break;
case R_MN10300_8:
*location += relocation;
*location = relocation;
break;

/* for the next three relocation types, we write the
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
cpuid = first_cpu(tmp);
}

return cpuid;
return get_hard_smp_processor_id(cpuid);
}
#else
static int irq_choose_cpu(unsigned int virt_irq)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/misc/sgi-gru/grufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ struct vm_operations_struct gru_vm_ops = {
.fault = gru_fault,
};

module_init(gru_init);
fs_initcall(gru_init);
module_exit(gru_exit);

module_param(gru_options, ulong, 0644);
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act,
goto failed_openfcp;

atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status);
schedule_work(&act->adapter->scan_work);

return ZFCP_ERP_SUCCEEDED;

Expand Down Expand Up @@ -1186,7 +1185,9 @@ static void zfcp_erp_scsi_scan(struct work_struct *work)
container_of(work, struct zfcp_erp_add_work, work);
struct zfcp_unit *unit = p->unit;
struct fc_rport *rport = unit->port->rport;
scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,

if (rport && rport->port_state == FC_PORTSTATE_ONLINE)
scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,
scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0);
atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
zfcp_unit_put(unit);
Expand Down Expand Up @@ -1282,6 +1283,8 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
if (result != ZFCP_ERP_SUCCEEDED)
zfcp_erp_rports_del(adapter);
else
schedule_work(&adapter->scan_work);
zfcp_adapter_put(adapter);
break;
}
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/s390/scsi/zfcp_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port)
if (mutex_lock_interruptible(&wka_port->mutex))
return -ERESTARTSYS;

if (wka_port->status != ZFCP_WKA_PORT_ONLINE) {
if (wka_port->status == ZFCP_WKA_PORT_OFFLINE ||
wka_port->status == ZFCP_WKA_PORT_CLOSING) {
wka_port->status = ZFCP_WKA_PORT_OPENING;
if (zfcp_fsf_open_wka_port(wka_port))
wka_port->status = ZFCP_WKA_PORT_OFFLINE;
Expand Down Expand Up @@ -125,8 +126,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,

read_lock_irqsave(&zfcp_data.config_lock, flags);
list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
/* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */
if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID))
if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN))
/* Try to connect to unused ports anyway. */
zfcp_erp_port_reopen(port,
ZFCP_STATUS_COMMON_ERP_FAILED,
Expand Down Expand Up @@ -610,7 +610,6 @@ int zfcp_scan_ports(struct zfcp_adapter *adapter)
int ret, i;
struct zfcp_gpn_ft *gpn_ft;

zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */
if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT)
return 0;

Expand Down
20 changes: 14 additions & 6 deletions trunk/drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,10 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
req_flags, adapter->pool.fsf_req_abort);
if (IS_ERR(req))
if (IS_ERR(req)) {
req = NULL;
goto out;
}

if (unlikely(!(atomic_read(&unit->status) &
ZFCP_STATUS_COMMON_UNBLOCKED)))
Expand Down Expand Up @@ -1584,6 +1586,7 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)
wka_port->status = ZFCP_WKA_PORT_OFFLINE;
break;
case FSF_PORT_ALREADY_OPEN:
break;
case FSF_GOOD:
wka_port->handle = header->port_handle;
wka_port->status = ZFCP_WKA_PORT_ONLINE;
Expand Down Expand Up @@ -2113,18 +2116,21 @@ static inline void zfcp_fsf_trace_latency(struct zfcp_fsf_req *fsf_req)

static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)
{
struct scsi_cmnd *scpnt = req->data;
struct scsi_cmnd *scpnt;
struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *)
&(req->qtcb->bottom.io.fcp_rsp);
u32 sns_len;
char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1];
unsigned long flags;

if (unlikely(!scpnt))
return;

read_lock_irqsave(&req->adapter->abort_lock, flags);

scpnt = req->data;
if (unlikely(!scpnt)) {
read_unlock_irqrestore(&req->adapter->abort_lock, flags);
return;
}

if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
set_host_byte(scpnt, DID_SOFT_ERROR);
set_driver_byte(scpnt, SUGGEST_RETRY);
Expand Down Expand Up @@ -2442,8 +2448,10 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
adapter->pool.fsf_req_scsi);
if (IS_ERR(req))
if (IS_ERR(req)) {
req = NULL;
goto out;
}

req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT;
req->data = unit;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0,
ZFCP_REQ_AUTO_CLEANUP);
if (unlikely(ret == -EBUSY))
zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT);
return SCSI_MLQUEUE_DEVICE_BUSY;
else if (unlikely(ret < 0))
return SCSI_MLQUEUE_HOST_BUSY;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
* Firmware has an individual device recovery time typically
* of 35 seconds, give us a margin.
*/
if (sdev->timeout < (45 * HZ))
sdev->timeout = 45 * HZ;
if (sdev->request_queue->rq_timeout < (45 * HZ))
blk_queue_rq_timeout(sdev->request_queue, 45*HZ);
for (cid = 0; cid < aac->maximum_num_containers; ++cid)
if (aac->fsa_dev[cid].valid)
++num_lsu;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev)
spin_lock_irqsave(shost->host_lock, lock_flags);
if (sdev->type == TYPE_DISK) {
sdev->allow_restart = 1;
sdev->timeout = 60 * HZ;
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
}
scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
spin_unlock_irqrestore(shost->host_lock, lock_flags);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,8 @@ static int megasas_slave_configure(struct scsi_device *sdev)
* The RAID firmware may require extended timeouts.
*/
if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
sdev->timeout = MEGASAS_DEFAULT_CMD_TIMEOUT * HZ;
blk_queue_rq_timeout(sdev->request_queue,
MEGASAS_DEFAULT_CMD_TIMEOUT * HZ);
return 0;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)
int i, rtn = NEEDS_RETRY;

for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
scmd->device->timeout, 0);
rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);

if (rtn == SUCCESS)
return 0;
Expand Down
23 changes: 11 additions & 12 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,18 @@ static inline int scsi_host_is_busy(struct Scsi_Host *shost)
*/
static void scsi_run_queue(struct request_queue *q)
{
struct scsi_device *starved_head = NULL, *sdev = q->queuedata;
struct scsi_device *sdev = q->queuedata;
struct Scsi_Host *shost = sdev->host;
LIST_HEAD(starved_list);
unsigned long flags;

if (scsi_target(sdev)->single_lun)
scsi_single_lun_run(sdev);

spin_lock_irqsave(shost->host_lock, flags);
while (!list_empty(&shost->starved_list) && !scsi_host_is_busy(shost)) {
list_splice_init(&shost->starved_list, &starved_list);

while (!list_empty(&starved_list)) {
int flagset;

/*
Expand All @@ -588,24 +591,18 @@ static void scsi_run_queue(struct request_queue *q)
* scsi_request_fn must get the host_lock before checking
* or modifying starved_list or starved_entry.
*/
sdev = list_entry(shost->starved_list.next,
struct scsi_device, starved_entry);
/*
* The *queue_ready functions can add a device back onto the
* starved list's tail, so we must check for a infinite loop.
*/
if (sdev == starved_head)
if (scsi_host_is_busy(shost))
break;
if (!starved_head)
starved_head = sdev;

sdev = list_entry(starved_list.next,
struct scsi_device, starved_entry);
list_del_init(&sdev->starved_entry);
if (scsi_target_is_busy(scsi_target(sdev))) {
list_move_tail(&sdev->starved_entry,
&shost->starved_list);
continue;
}

list_del_init(&sdev->starved_entry);
spin_unlock(shost->host_lock);

spin_lock(sdev->request_queue->queue_lock);
Expand All @@ -621,6 +618,8 @@ static void scsi_run_queue(struct request_queue *q)

spin_lock(shost->host_lock);
}
/* put any unprocessed entries back */
list_splice(&starved_list, &shost->starved_list);
spin_unlock_irqrestore(shost->host_lock, flags);

blk_run_queue(q);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ stex_slave_config(struct scsi_device *sdev)
{
sdev->use_10_for_rw = 1;
sdev->use_10_for_ms = 1;
sdev->timeout = 60 * HZ;
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
sdev->tagged_supported = 1;

return 0;
Expand Down
12 changes: 8 additions & 4 deletions trunk/include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -1818,17 +1818,21 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz)

static inline int security_vm_enough_memory(long pages)
{
WARN_ON(current->mm == NULL);
return cap_vm_enough_memory(current->mm, pages);
}

static inline int security_vm_enough_memory_kern(long pages)
static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
{
return cap_vm_enough_memory(current->mm, pages);
WARN_ON(mm == NULL);
return cap_vm_enough_memory(mm, pages);
}

static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
static inline int security_vm_enough_memory_kern(long pages)
{
return cap_vm_enough_memory(mm, pages);
/* If current->mm is a kernel thread then we will pass NULL,
for this specific case that is fine */
return cap_vm_enough_memory(current->mm, pages);
}

static inline int security_bprm_alloc(struct linux_binprm *bprm)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/scsi/scsi_transport_fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ struct fc_rport { /* aka fc_starget_attrs */
/* bit field values for struct fc_rport "flags" field: */
#define FC_RPORT_DEVLOSS_PENDING 0x01
#define FC_RPORT_SCAN_PENDING 0x02
#define FC_RPORT_FAST_FAIL_TIMEDOUT 0x03
#define FC_RPORT_FAST_FAIL_TIMEDOUT 0x04

#define dev_to_rport(d) \
container_of(d, struct fc_rport, dev)
Expand Down
3 changes: 3 additions & 0 deletions trunk/mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
int ret = 0;
struct device *dev;

if (WARN_ON(bdi->dev))
goto exit;

va_start(args, fmt);
dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args);
va_end(args);
Expand Down
7 changes: 6 additions & 1 deletion trunk/mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
for (i = 0; i < pagevec_count(pvec); i++) {
struct page *page = pvec->pages[i];
struct zone *pagezone = page_zone(page);
int file;

if (pagezone != zone) {
if (zone)
Expand All @@ -456,8 +457,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
VM_BUG_ON(PageUnevictable(page));
VM_BUG_ON(PageLRU(page));
SetPageLRU(page);
if (is_active_lru(lru))
file = is_file_lru(lru);
zone->recent_scanned[file]++;
if (is_active_lru(lru)) {
SetPageActive(page);
zone->recent_rotated[file]++;
}
add_page_to_lru_list(zone, page, lru);
}
if (zone)
Expand Down

0 comments on commit f93364f

Please sign in to comment.