diff --git a/[refs] b/[refs] index dd12950e82f0..b86817e09607 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f786648b89f00d4e66fe6b19beffd30e764651fc +refs/heads/master: 84a2ea1c2cee0288f96e0c6aa4f975d4d26508c7 diff --git a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c index 411ea9996190..7f58afb27e71 100644 --- a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data coyote_flash_data = { static struct resource coyote_flash_resource = { .start = COYOTE_FLASH_BASE, - .end = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1, + .end = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE, .flags = IORESOURCE_MEM, }; diff --git a/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c index 333459d6aa46..65e356bd10d6 100644 --- a/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -114,7 +114,7 @@ static struct flash_platform_data gtwx5715_flash_data = { static struct resource gtwx5715_flash_resource = { .start = GTWX5715_FLASH_BASE, - .end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1, + .end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE, .flags = IORESOURCE_MEM, }; diff --git a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c index fa0646c8693b..4633470a6a37 100644 --- a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data ixdp425_flash_data = { static struct resource ixdp425_flash_resource = { .start = IXDP425_FLASH_BASE, - .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1, + .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE, .flags = IORESOURCE_MEM, }; diff --git a/trunk/arch/ia64/pci/pci.c b/trunk/arch/ia64/pci/pci.c index f9472c50ab42..54d9ed444e4a 100644 --- a/trunk/arch/ia64/pci/pci.c +++ b/trunk/arch/ia64/pci/pci.c @@ -380,7 +380,6 @@ void pcibios_bus_to_resource(struct pci_dev *dev, res->start = region->start + offset; res->end = region->end + offset; } -EXPORT_SYMBOL(pcibios_bus_to_resource); static int __devinit is_valid_resource(struct pci_dev *dev, int idx) { diff --git a/trunk/arch/ppc/syslib/m8xx_setup.c b/trunk/arch/ppc/syslib/m8xx_setup.c index a3702cfe8f7c..55a381af4e37 100644 --- a/trunk/arch/ppc/syslib/m8xx_setup.c +++ b/trunk/arch/ppc/syslib/m8xx_setup.c @@ -423,7 +423,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ppc_md.find_end_of_memory = m8xx_find_end_of_memory; ppc_md.setup_io_mappings = m8xx_map_io; -#if defined(CONFIG_BLK_DEV_MPC8xx_IDE) +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) m8xx_ide_init(); #endif } diff --git a/trunk/arch/ppc64/kernel/setup.c b/trunk/arch/ppc64/kernel/setup.c index e9c24d2dbd91..687e85595208 100644 --- a/trunk/arch/ppc64/kernel/setup.c +++ b/trunk/arch/ppc64/kernel/setup.c @@ -706,8 +706,6 @@ void machine_power_off(void) local_irq_disable(); while (1) ; } -/* Used by the G5 thermal driver */ -EXPORT_SYMBOL_GPL(machine_power_off); void machine_halt(void) { diff --git a/trunk/arch/sparc64/kernel/pci.c b/trunk/arch/sparc64/kernel/pci.c index f21c993f8856..bba140d98b1b 100644 --- a/trunk/arch/sparc64/kernel/pci.c +++ b/trunk/arch/sparc64/kernel/pci.c @@ -540,7 +540,6 @@ void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res, pbm->parent->resource_adjust(pdev, res, root); } -EXPORT_SYMBOL(pcibios_bus_to_resource); char * __init pcibios_setup(char *str) { diff --git a/trunk/arch/um/drivers/mmapper_kern.c b/trunk/arch/um/drivers/mmapper_kern.c index 022f67bb6873..a37a5ac13c22 100644 --- a/trunk/arch/um/drivers/mmapper_kern.c +++ b/trunk/arch/um/drivers/mmapper_kern.c @@ -9,11 +9,19 @@ * */ -#include +#include +#include +#include +#include #include #include +#include +#include +#include #include #include +#include +#include #include "mem_user.h" #include "user_util.h" @@ -23,22 +31,35 @@ static unsigned long p_buf = 0; static char *v_buf = NULL; static ssize_t -mmapper_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) +mmapper_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - return simple_read_from_buffer(buf, count, ppos, v_buf, mmapper_size); + if(*ppos > mmapper_size) + return -EINVAL; + + if(count + *ppos > mmapper_size) + count = count + *ppos - mmapper_size; + + if(count < 0) + return -EINVAL; + + copy_to_user(buf,&v_buf[*ppos],count); + + return count; } static ssize_t -mmapper_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) +mmapper_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - if (*ppos > mmapper_size) + if(*ppos > mmapper_size) return -EINVAL; - if (count > mmapper_size - *ppos) - count = mmapper_size - *ppos; + if(count + *ppos > mmapper_size) + count = count + *ppos - mmapper_size; + + if(count < 0) + return -EINVAL; - if (copy_from_user(&v_buf[*ppos], buf, count)) - return -EFAULT; + copy_from_user(&v_buf[*ppos],buf,count); return count; } @@ -56,6 +77,7 @@ mmapper_mmap(struct file *file, struct vm_area_struct * vma) int ret = -EINVAL; int size; + lock_kernel(); if (vma->vm_pgoff != 0) goto out; @@ -70,6 +92,7 @@ mmapper_mmap(struct file *file, struct vm_area_struct * vma) goto out; ret = 0; out: + unlock_kernel(); return ret; } diff --git a/trunk/arch/x86_64/defconfig b/trunk/arch/x86_64/defconfig index b97a61e1c71c..776f3c866b70 100644 --- a/trunk/arch/x86_64/defconfig +++ b/trunk/arch/x86_64/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.13-rc6-git3 -# Fri Aug 12 16:40:34 2005 +# Linux kernel version: 2.6.13-rc3 +# Fri Jul 22 16:47:31 2005 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -284,6 +284,10 @@ CONFIG_IPV6=y # Network testing # # CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -459,7 +463,6 @@ CONFIG_AIC79XX_DEBUG_MASK=0 # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y -# CONFIG_SCSI_SATA_AHCI is not set # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_NV is not set @@ -489,7 +492,6 @@ CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA24XX is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set @@ -510,11 +512,9 @@ CONFIG_BLK_DEV_DM=y # # Fusion MPT device support # -CONFIG_FUSION=y -CONFIG_FUSION_SPI=y +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set # CONFIG_FUSION_FC is not set -CONFIG_FUSION_MAX_SGE=128 -# CONFIG_FUSION_CTL is not set # # IEEE 1394 (FireWire) support @@ -585,7 +585,6 @@ CONFIG_8139TOO=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y -# CONFIG_E1000_NAPI is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -625,10 +624,6 @@ CONFIG_S2IO=m # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set CONFIG_NETCONSOLE=y -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem diff --git a/trunk/arch/x86_64/kernel/e820.c b/trunk/arch/x86_64/kernel/e820.c index b548dea4e5b9..6ded3a50dfe6 100644 --- a/trunk/arch/x86_64/kernel/e820.c +++ b/trunk/arch/x86_64/kernel/e820.c @@ -185,40 +185,6 @@ unsigned long __init e820_end_of_ram(void) } /* - * Compute how much memory is missing in a range. - * Unlike the other functions in this file the arguments are in page numbers. - */ -unsigned long __init -e820_hole_size(unsigned long start_pfn, unsigned long end_pfn) -{ - unsigned long ram = 0; - unsigned long start = start_pfn << PAGE_SHIFT; - unsigned long end = end_pfn << PAGE_SHIFT; - int i; - for (i = 0; i < e820.nr_map; i++) { - struct e820entry *ei = &e820.map[i]; - unsigned long last, addr; - - if (ei->type != E820_RAM || - ei->addr+ei->size <= start || - ei->addr >= end) - continue; - - addr = round_up(ei->addr, PAGE_SIZE); - if (addr < start) - addr = start; - - last = round_down(ei->addr + ei->size, PAGE_SIZE); - if (last >= end) - last = end; - - if (last > addr) - ram += last - addr; - } - return ((end - start) - ram) >> PAGE_SHIFT; -} - -/* * Mark e820 reserved areas as busy for the resource manager. */ void __init e820_reserve_resources(void) diff --git a/trunk/arch/x86_64/mm/init.c b/trunk/arch/x86_64/mm/init.c index aa4a5189ecee..72e4b364ed73 100644 --- a/trunk/arch/x86_64/mm/init.c +++ b/trunk/arch/x86_64/mm/init.c @@ -322,26 +322,18 @@ void zap_low_mappings(void) void __init paging_init(void) { { - unsigned long zones_size[MAX_NR_ZONES]; - unsigned long holes[MAX_NR_ZONES]; + unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; unsigned int max_dma; - memset(zones_size, 0, sizeof(zones_size)); - memset(holes, 0, sizeof(holes)); - max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; - if (end_pfn < max_dma) { + if (end_pfn < max_dma) zones_size[ZONE_DMA] = end_pfn; - holes[ZONE_DMA] = e820_hole_size(0, end_pfn); - } else { + else { zones_size[ZONE_DMA] = max_dma; - holes[ZONE_DMA] = e820_hole_size(0, max_dma); zones_size[ZONE_NORMAL] = end_pfn - max_dma; - holes[ZONE_NORMAL] = e820_hole_size(max_dma, end_pfn); } - free_area_init_node(0, NODE_DATA(0), zones_size, - __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes); + free_area_init(zones_size); } return; } diff --git a/trunk/arch/x86_64/mm/numa.c b/trunk/arch/x86_64/mm/numa.c index 6a156f5692ae..70cb2904a90f 100644 --- a/trunk/arch/x86_64/mm/numa.c +++ b/trunk/arch/x86_64/mm/numa.c @@ -126,11 +126,9 @@ void __init setup_node_zones(int nodeid) { unsigned long start_pfn, end_pfn; unsigned long zones[MAX_NR_ZONES]; - unsigned long holes[MAX_NR_ZONES]; unsigned long dma_end_pfn; memset(zones, 0, sizeof(unsigned long) * MAX_NR_ZONES); - memset(holes, 0, sizeof(unsigned long) * MAX_NR_ZONES); start_pfn = node_start_pfn(nodeid); end_pfn = node_end_pfn(nodeid); @@ -141,17 +139,13 @@ void __init setup_node_zones(int nodeid) dma_end_pfn = __pa(MAX_DMA_ADDRESS) >> PAGE_SHIFT; if (start_pfn < dma_end_pfn) { zones[ZONE_DMA] = dma_end_pfn - start_pfn; - holes[ZONE_DMA] = e820_hole_size(start_pfn, dma_end_pfn); zones[ZONE_NORMAL] = end_pfn - dma_end_pfn; - holes[ZONE_NORMAL] = e820_hole_size(dma_end_pfn, end_pfn); - } else { zones[ZONE_NORMAL] = end_pfn - start_pfn; - holes[ZONE_NORMAL] = e820_hole_size(start_pfn, end_pfn); } free_area_init_node(nodeid, NODE_DATA(nodeid), zones, - start_pfn, holes); + start_pfn, NULL); } void __init numa_init_array(void) diff --git a/trunk/drivers/acpi/sleep/poweroff.c b/trunk/drivers/acpi/sleep/poweroff.c index f93d2ee54800..186b182c5825 100644 --- a/trunk/drivers/acpi/sleep/poweroff.c +++ b/trunk/drivers/acpi/sleep/poweroff.c @@ -55,11 +55,7 @@ void acpi_power_off(void) static int acpi_shutdown(struct sys_device *x) { - if (system_state == SYSTEM_POWER_OFF) { - /* Prepare if we are going to power off the system */ - return acpi_sleep_prepare(ACPI_STATE_S5); - } - return 0; + return acpi_sleep_prepare(ACPI_STATE_S5); } static struct sysdev_class acpi_sysclass = { diff --git a/trunk/drivers/block/cfq-iosched.c b/trunk/drivers/block/cfq-iosched.c index cd056e7e64ec..2435a7c99b2b 100644 --- a/trunk/drivers/block/cfq-iosched.c +++ b/trunk/drivers/block/cfq-iosched.c @@ -47,7 +47,7 @@ static int cfq_slice_idle = HZ / 100; /* * disable queueing at the driver/hardware level */ -static int cfq_max_depth = 2; +static int cfq_max_depth = 1; /* * for the hash of cfqq inside the cfqd @@ -385,15 +385,9 @@ cfq_choose_req(struct cfq_data *cfqd, struct cfq_rq *crq1, struct cfq_rq *crq2) return crq2; if (crq2 == NULL) return crq1; - - if (cfq_crq_requeued(crq1) && !cfq_crq_requeued(crq2)) + if (cfq_crq_requeued(crq1)) return crq1; - else if (cfq_crq_requeued(crq2) && !cfq_crq_requeued(crq1)) - return crq2; - - if (cfq_crq_is_sync(crq1) && !cfq_crq_is_sync(crq2)) - return crq1; - else if (cfq_crq_is_sync(crq2) && !cfq_crq_is_sync(crq1)) + if (cfq_crq_requeued(crq2)) return crq2; s1 = crq1->request->sector; @@ -1775,23 +1769,18 @@ static void cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, struct cfq_rq *crq) { - struct cfq_io_context *cic; + const int sync = cfq_crq_is_sync(crq); cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); - /* - * we never wait for an async request and we don't allow preemption - * of an async request. so just return early - */ - if (!cfq_crq_is_sync(crq)) - return; + if (sync) { + struct cfq_io_context *cic = crq->io_context; - cic = crq->io_context; + cfq_update_io_thinktime(cfqd, cic); + cfq_update_idle_window(cfqd, cfqq, cic); - cfq_update_io_thinktime(cfqd, cic); - cfq_update_idle_window(cfqd, cfqq, cic); - - cic->last_queue = jiffies; + cic->last_queue = jiffies; + } if (cfqq == cfqd->active_queue) { /* diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index 665103ccaee8..30d96739fb23 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -2433,7 +2433,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) int ret = 0; acquire_console_sem(); - if (tty->driver_data == NULL) { + if (tty->count == 1) { ret = vc_allocate(currcons); if (ret == 0) { struct vc_data *vc = vc_cons[currcons].d; diff --git a/trunk/drivers/hwmon/adm1026.c b/trunk/drivers/hwmon/adm1026.c index c8a7f47911f9..4fa17c76eea2 100644 --- a/trunk/drivers/hwmon/adm1026.c +++ b/trunk/drivers/hwmon/adm1026.c @@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_adapter *adapter) int adm1026_detach_client(struct i2c_client *client) { i2c_detach_client(client); - kfree(i2c_get_clientdata(client)); + kfree(client); return 0; } @@ -1691,7 +1691,7 @@ int adm1026_detect(struct i2c_adapter *adapter, int address, /* Error out and cleanup code */ exitfree: - kfree(data); + kfree(new_client); exit: return err; } diff --git a/trunk/drivers/hwmon/adm1031.c b/trunk/drivers/hwmon/adm1031.c index 936250957270..9168e983ca1d 100644 --- a/trunk/drivers/hwmon/adm1031.c +++ b/trunk/drivers/hwmon/adm1031.c @@ -834,7 +834,7 @@ static int adm1031_detect(struct i2c_adapter *adapter, int address, int kind) return 0; exit_free: - kfree(data); + kfree(new_client); exit: return err; } @@ -845,7 +845,7 @@ static int adm1031_detach_client(struct i2c_client *client) if ((ret = i2c_detach_client(client)) != 0) { return ret; } - kfree(i2c_get_clientdata(client)); + kfree(client); return 0; } diff --git a/trunk/drivers/hwmon/adm9240.c b/trunk/drivers/hwmon/adm9240.c index ce2a6eb93f6e..5c68e9c311aa 100644 --- a/trunk/drivers/hwmon/adm9240.c +++ b/trunk/drivers/hwmon/adm9240.c @@ -616,7 +616,7 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind) return 0; exit_free: - kfree(data); + kfree(new_client); exit: return err; } diff --git a/trunk/drivers/hwmon/fscpos.c b/trunk/drivers/hwmon/fscpos.c index 301ae98bd0ad..270015b626ad 100644 --- a/trunk/drivers/hwmon/fscpos.c +++ b/trunk/drivers/hwmon/fscpos.c @@ -167,7 +167,7 @@ static ssize_t set_temp_reset(struct i2c_client *client, struct fscpos_data "experience to the module author.\n"); /* Supported value: 2 (clears the status) */ - fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr - 1], 2); + fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr], 2); return count; } diff --git a/trunk/drivers/hwmon/smsc47b397.c b/trunk/drivers/hwmon/smsc47b397.c index fdeeb3ab6f2f..251ac2659554 100644 --- a/trunk/drivers/hwmon/smsc47b397.c +++ b/trunk/drivers/hwmon/smsc47b397.c @@ -298,7 +298,7 @@ static int smsc47b397_detect(struct i2c_adapter *adapter, int addr, int kind) return 0; error_free: - kfree(data); + kfree(new_client); error_release: release_region(addr, SMSC_EXTENT); return err; diff --git a/trunk/drivers/hwmon/smsc47m1.c b/trunk/drivers/hwmon/smsc47m1.c index 7166ad0b2fda..897117a7213f 100644 --- a/trunk/drivers/hwmon/smsc47m1.c +++ b/trunk/drivers/hwmon/smsc47m1.c @@ -495,7 +495,7 @@ static int smsc47m1_detect(struct i2c_adapter *adapter, int address, int kind) return 0; error_free: - kfree(data); + kfree(new_client); error_release: release_region(address, SMSC_EXTENT); return err; diff --git a/trunk/drivers/ieee1394/ohci1394.c b/trunk/drivers/ieee1394/ohci1394.c index 27018c8efc24..b12a970cc9a3 100644 --- a/trunk/drivers/ieee1394/ohci1394.c +++ b/trunk/drivers/ieee1394/ohci1394.c @@ -478,6 +478,7 @@ static void ohci_initialize(struct ti_ohci *ohci) int num_ports, i; spin_lock_init(&ohci->phy_reg_lock); + spin_lock_init(&ohci->event_lock); /* Put some defaults to these undefined bus options */ buf = reg_read(ohci, OHCI1394_BusOptions); @@ -3401,14 +3402,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, /* We hopefully don't have to pre-allocate IT DMA like we did * for IR DMA above. Allocate it on-demand and mark inactive. */ ohci->it_legacy_context.ohci = NULL; - spin_lock_init(&ohci->event_lock); - /* - * interrupts are disabled, all right, but... due to SA_SHIRQ we - * might get called anyway. We'll see no event, of course, but - * we need to get to that "no event", so enough should be initialized - * by that point. - */ if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, OHCI1394_DRIVER_NAME, ohci)) FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); diff --git a/trunk/drivers/infiniband/core/uverbs_main.c b/trunk/drivers/infiniband/core/uverbs_main.c index 5f6e9ea29cd7..eb99e693dec2 100644 --- a/trunk/drivers/infiniband/core/uverbs_main.c +++ b/trunk/drivers/infiniband/core/uverbs_main.c @@ -130,14 +130,13 @@ static int ib_dealloc_ucontext(struct ib_ucontext *context) list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) { struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id); - struct ib_device *mrdev = mr->device; struct ib_umem_object *memobj; idr_remove(&ib_uverbs_mr_idr, uobj->id); ib_dereg_mr(mr); memobj = container_of(uobj, struct ib_umem_object, uobject); - ib_umem_release_on_close(mrdev, &memobj->umem); + ib_umem_release_on_close(mr->device, &memobj->umem); list_del(&uobj->list); kfree(memobj); diff --git a/trunk/drivers/isdn/capi/capifs.c b/trunk/drivers/isdn/capi/capifs.c index 3abd7fc6e5ef..f8570fd9d2ab 100644 --- a/trunk/drivers/isdn/capi/capifs.c +++ b/trunk/drivers/isdn/capi/capifs.c @@ -191,10 +191,8 @@ static int __init capifs_init(void) err = register_filesystem(&capifs_fs_type); if (!err) { capifs_mnt = kern_mount(&capifs_fs_type); - if (IS_ERR(capifs_mnt)) { + if (IS_ERR(capifs_mnt)) err = PTR_ERR(capifs_mnt); - unregister_filesystem(&capifs_fs_type); - } } if (!err) printk(KERN_NOTICE "capifs: Rev %s\n", rev); diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index 20ca80b7dc20..486ee50cfdda 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -1689,7 +1689,6 @@ static int do_md_run(mddev_t * mddev) mddev->pers = pers[pnum]; spin_unlock(&pers_lock); - mddev->recovery = 0; mddev->resync_max_sectors = mddev->size << 1; /* may be over-ridden by personality */ /* before we start the array running, initialise the bitmap */ @@ -4012,4 +4011,3 @@ EXPORT_SYMBOL(md_print_devices); EXPORT_SYMBOL(md_check_recovery); MODULE_LICENSE("GPL"); MODULE_ALIAS("md"); -MODULE_ALIAS_BLOCKDEV_MAJOR(MD_MAJOR); diff --git a/trunk/drivers/media/dvb/dvb-usb/dibusb-common.c b/trunk/drivers/media/dvb/dvb-usb/dibusb-common.c index 9b9d6f8ee74e..63b626f70c81 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/trunk/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -70,22 +70,13 @@ EXPORT_SYMBOL(dibusb_power_ctrl); int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff) { - u8 b[3] = { 0 }; - int ret; - - if ((ret = dibusb_streaming_ctrl(d,onoff)) < 0) - return ret; - - if (onoff) { - b[0] = DIBUSB_REQ_SET_STREAMING_MODE; - b[1] = 0x00; - if ((ret = dvb_usb_generic_write(d,b,2)) < 0) - return ret; - } - + u8 b[2]; b[0] = DIBUSB_REQ_SET_IOCTL; b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM; - return dvb_usb_generic_write(d,b,3); + + dvb_usb_generic_write(d,b,3); + + return dibusb_streaming_ctrl(d,onoff); } EXPORT_SYMBOL(dibusb2_0_streaming_ctrl); diff --git a/trunk/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/trunk/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index 6fa92100248b..3491ff40885c 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/trunk/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c @@ -23,12 +23,12 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) */ if (newfeedcount == 0) { deb_ts("stop feeding\n"); - dvb_usb_urb_kill(d); if (d->props.streaming_ctrl != NULL) if ((ret = d->props.streaming_ctrl(d,0))) err("error while stopping stream."); + dvb_usb_urb_kill(d); } d->feedcount = newfeedcount; @@ -44,8 +44,6 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) * for reception. */ if (d->feedcount == onoff && d->feedcount > 0) { - deb_ts("submitting all URBs\n"); - dvb_usb_urb_submit(d); deb_ts("controlling pid parser\n"); if (d->props.caps & DVB_USB_HAS_PID_FILTER && @@ -61,6 +59,7 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) return -ENODEV; } + dvb_usb_urb_submit(d); } return 0; } diff --git a/trunk/drivers/net/hamradio/6pack.c b/trunk/drivers/net/hamradio/6pack.c index f9e3be96963c..b59c65b9645b 100644 --- a/trunk/drivers/net/hamradio/6pack.c +++ b/trunk/drivers/net/hamradio/6pack.c @@ -668,6 +668,9 @@ static int sixpack_open(struct tty_struct *tty) netif_start_queue(dev); init_timer(&sp->tx_t); + sp->tx_t.function = sp_xmit_on_air; + sp->tx_t.data = (unsigned long) sp; + init_timer(&sp->resync_t); spin_unlock_bh(&sp->lock); diff --git a/trunk/drivers/net/ibm_emac/ibm_emac_core.c b/trunk/drivers/net/ibm_emac/ibm_emac_core.c index 0de3bb906174..c7fb3675c09d 100644 --- a/trunk/drivers/net/ibm_emac/ibm_emac_core.c +++ b/trunk/drivers/net/ibm_emac/ibm_emac_core.c @@ -1253,7 +1253,7 @@ static int emac_init_tah(struct ocp_enet_private *fep) TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP | TAH_MR_DIG); - iounmap(tahp); + iounmap(&tahp); return 0; } diff --git a/trunk/drivers/net/tg3.c b/trunk/drivers/net/tg3.c index 6d4ab1e333b5..01419aff333e 100644 --- a/trunk/drivers/net/tg3.c +++ b/trunk/drivers/net/tg3.c @@ -66,8 +66,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.37" -#define DRV_MODULE_RELDATE "August 25, 2005" +#define DRV_MODULE_VERSION "3.36" +#define DRV_MODULE_RELDATE "August 19, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -7865,6 +7865,8 @@ static int tg3_test_loopback(struct tg3 *tp) err = -EIO; + tg3_abort_hw(tp, 1); + tg3_reset_hw(tp); mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) | diff --git a/trunk/drivers/pci/setup-bus.c b/trunk/drivers/pci/setup-bus.c index 6d864c502a1f..a2eebc6eaacc 100644 --- a/trunk/drivers/pci/setup-bus.c +++ b/trunk/drivers/pci/setup-bus.c @@ -40,7 +40,7 @@ * FIXME: IO should be max 256 bytes. However, since we may * have a P2P bridge below a cardbus bridge, we need 4K. */ -#define CARDBUS_IO_SIZE (256) +#define CARDBUS_IO_SIZE (4096) #define CARDBUS_MEM_SIZE (32*1024*1024) static void __devinit diff --git a/trunk/drivers/pci/setup-res.c b/trunk/drivers/pci/setup-res.c index 5598b4714f77..84eedc965688 100644 --- a/trunk/drivers/pci/setup-res.c +++ b/trunk/drivers/pci/setup-res.c @@ -53,9 +53,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) if (resno < 6) { reg = PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { - if (!(res->flags & IORESOURCE_ROM_ENABLE)) - return; - new |= PCI_ROM_ADDRESS_ENABLE; + new |= res->flags & IORESOURCE_ROM_ENABLE; reg = dev->rom_base_reg; } else { /* Hmm, non-standard resource. */ diff --git a/trunk/drivers/s390/cio/qdio.c b/trunk/drivers/s390/cio/qdio.c index 381f339e3200..533f90c05cdf 100644 --- a/trunk/drivers/s390/cio/qdio.c +++ b/trunk/drivers/s390/cio/qdio.c @@ -112,7 +112,7 @@ qdio_min(int a,int b) /***************** SCRUBBER HELPER ROUTINES **********************/ -static inline __u64 +static inline volatile __u64 qdio_get_micros(void) { return (get_clock() >> 10); /* time>>12 is microseconds */ diff --git a/trunk/drivers/s390/scsi/zfcp_aux.c b/trunk/drivers/s390/scsi/zfcp_aux.c index 6fed4a532ca3..e17b4d58a9f6 100644 --- a/trunk/drivers/s390/scsi/zfcp_aux.c +++ b/trunk/drivers/s390/scsi/zfcp_aux.c @@ -1299,10 +1299,13 @@ struct zfcp_port * zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, u32 d_id) { - struct zfcp_port *port; + struct zfcp_port *port, *tmp_port; int check_wwpn; + scsi_id_t scsi_id; + int found; check_wwpn = !(status & ZFCP_STATUS_PORT_NO_WWPN); + /* * check that there is no port with this WWPN already in list */ @@ -1365,7 +1368,7 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, } else { snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", wwpn); - port->sysfs_device.parent = &adapter->ccw_device->dev; + port->sysfs_device.parent = &adapter->ccw_device->dev; } port->sysfs_device.release = zfcp_sysfs_port_release; dev_set_drvdata(&port->sysfs_device, port); @@ -1385,8 +1388,24 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, zfcp_port_get(port); + scsi_id = 1; + found = 0; write_lock_irq(&zfcp_data.config_lock); - list_add_tail(&port->list, &adapter->port_list_head); + list_for_each_entry(tmp_port, &adapter->port_list_head, list) { + if (atomic_test_mask(ZFCP_STATUS_PORT_NO_SCSI_ID, + &tmp_port->status)) + continue; + if (tmp_port->scsi_id != scsi_id) { + found = 1; + break; + } + scsi_id++; + } + port->scsi_id = scsi_id; + if (found) + list_add_tail(&port->list, &tmp_port->list); + else + list_add_tail(&port->list, &adapter->port_list_head); atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status); if (d_id == ZFCP_DID_DIRECTORY_SERVICE) @@ -1403,15 +1422,11 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, void zfcp_port_dequeue(struct zfcp_port *port) { - struct fc_port *rport; - zfcp_port_wait(port); write_lock_irq(&zfcp_data.config_lock); list_del(&port->list); port->adapter->ports--; write_unlock_irq(&zfcp_data.config_lock); - if (port->rport) - fc_remote_port_delete(rport); zfcp_adapter_put(port->adapter); zfcp_sysfs_port_remove_files(&port->sysfs_device, atomic_read(&port->status)); diff --git a/trunk/drivers/s390/scsi/zfcp_ccw.c b/trunk/drivers/s390/scsi/zfcp_ccw.c index 3c65aedaa97f..0fc46381fc22 100644 --- a/trunk/drivers/s390/scsi/zfcp_ccw.c +++ b/trunk/drivers/s390/scsi/zfcp_ccw.c @@ -202,19 +202,9 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) { struct zfcp_adapter *adapter; - struct zfcp_port *port; - struct fc_port *rport; down(&zfcp_data.config_sema); adapter = dev_get_drvdata(&ccw_device->dev); - /* might be racy, but we cannot take config_lock due to the fact that - fc_remote_port_delete might sleep */ - list_for_each_entry(port, &adapter->port_list_head, list) - if (port->rport) { - rport = port->rport; - port->rport = NULL; - fc_remote_port_delete(rport); - } zfcp_erp_adapter_shutdown(adapter, 0); zfcp_erp_wait(adapter); zfcp_adapter_scsi_unregister(adapter); diff --git a/trunk/drivers/s390/scsi/zfcp_def.h b/trunk/drivers/s390/scsi/zfcp_def.h index 455e902533a9..4103b5be7683 100644 --- a/trunk/drivers/s390/scsi/zfcp_def.h +++ b/trunk/drivers/s390/scsi/zfcp_def.h @@ -906,7 +906,6 @@ struct zfcp_adapter { */ struct zfcp_port { struct device sysfs_device; /* sysfs device */ - struct fc_rport *rport; /* rport of fc transport class */ struct list_head list; /* list of remote ports */ atomic_t refcount; /* reference count */ wait_queue_head_t remove_wq; /* can be used to wait for @@ -917,6 +916,7 @@ struct zfcp_port { list */ u32 units; /* # of logical units in list */ atomic_t status; /* status of this remote port */ + scsi_id_t scsi_id; /* own SCSI ID */ wwn_t wwnn; /* WWNN if known */ wwn_t wwpn; /* WWPN */ fc_id_t d_id; /* D_ID */ diff --git a/trunk/drivers/s390/scsi/zfcp_erp.c b/trunk/drivers/s390/scsi/zfcp_erp.c index cb4f612550ba..0cf31f7d1c0f 100644 --- a/trunk/drivers/s390/scsi/zfcp_erp.c +++ b/trunk/drivers/s390/scsi/zfcp_erp.c @@ -3360,32 +3360,13 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, if ((result == ZFCP_ERP_SUCCEEDED) && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, &unit->status)) - && !unit->device - && port->rport) - scsi_add_device(port->adapter->scsi_host, 0, - port->rport->scsi_target_id, - unit->scsi_lun); + && (!unit->device)) + scsi_add_device(unit->port->adapter->scsi_host, 0, + unit->port->scsi_id, unit->scsi_lun); zfcp_unit_put(unit); break; case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: case ZFCP_ERP_ACTION_REOPEN_PORT: - if ((result == ZFCP_ERP_SUCCEEDED) - && !atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, - &port->status) - && !port->rport) { - struct fc_rport_identifiers ids; - ids.node_name = port->wwnn; - ids.port_name = port->wwpn; - ids.port_id = port->d_id; - ids.roles = FC_RPORT_ROLE_FCP_TARGET; - port->rport = - fc_remote_port_add(adapter->scsi_host, 0, &ids); - if (!port->rport) - ZFCP_LOG_NORMAL("failed registration of rport" - "(adapter %s, wwpn=0x%016Lx)\n", - zfcp_get_busid_by_port(port), - port->wwpn); - } zfcp_port_put(port); break; case ZFCP_ERP_ACTION_REOPEN_ADAPTER: diff --git a/trunk/drivers/s390/scsi/zfcp_ext.h b/trunk/drivers/s390/scsi/zfcp_ext.h index cd98a2de9f8f..42df7e57eeae 100644 --- a/trunk/drivers/s390/scsi/zfcp_ext.h +++ b/trunk/drivers/s390/scsi/zfcp_ext.h @@ -143,8 +143,6 @@ extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *, struct scsi_cmnd *, struct timer_list *); extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, struct timer_list *); -extern void zfcp_set_fc_host_attrs(struct zfcp_adapter *); -extern void zfcp_set_fc_rport_attrs(struct zfcp_port *); extern struct scsi_transport_template *zfcp_transport_template; extern struct fc_function_template zfcp_transport_functions; diff --git a/trunk/drivers/s390/scsi/zfcp_fsf.c b/trunk/drivers/s390/scsi/zfcp_fsf.c index c007b6424e74..0d9f20edc490 100644 --- a/trunk/drivers/s390/scsi/zfcp_fsf.c +++ b/trunk/drivers/s390/scsi/zfcp_fsf.c @@ -2062,7 +2062,6 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) zfcp_erp_adapter_shutdown(adapter, 0); return -EIO; } - zfcp_set_fc_host_attrs(adapter); return 0; } diff --git a/trunk/drivers/s390/scsi/zfcp_scsi.c b/trunk/drivers/s390/scsi/zfcp_scsi.c index 31a76065cf28..b61d309352c3 100644 --- a/trunk/drivers/s390/scsi/zfcp_scsi.c +++ b/trunk/drivers/s390/scsi/zfcp_scsi.c @@ -389,7 +389,7 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id, struct zfcp_unit *unit, *retval = NULL; list_for_each_entry(port, &adapter->port_list_head, list) { - if (!port->rport || (id != port->rport->scsi_target_id)) + if (id != port->scsi_id) continue; list_for_each_entry(unit, &port->unit_list_head, list) { if (lun == unit->scsi_lun) { @@ -408,7 +408,7 @@ zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id) struct zfcp_port *port; list_for_each_entry(port, &adapter->port_list_head, list) { - if (port->rport && (id == port->rport->scsi_target_id)) + if (id == port->scsi_id) return port; } return (struct zfcp_port *) NULL; @@ -634,6 +634,7 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) { int retval; struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata; + struct Scsi_Host *scsi_host = scpnt->device->host; if (!unit) { ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n"); @@ -728,6 +729,7 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) { int retval = 0; struct zfcp_unit *unit; + struct Scsi_Host *scsi_host = scpnt->device->host; unit = (struct zfcp_unit *) scpnt->device->hostdata; ZFCP_LOG_NORMAL("bus reset because of problems with " @@ -751,6 +753,7 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) { int retval = 0; struct zfcp_unit *unit; + struct Scsi_Host *scsi_host = scpnt->device->host; unit = (struct zfcp_unit *) scpnt->device->hostdata; ZFCP_LOG_NORMAL("host reset because of problems with " @@ -830,7 +833,6 @@ zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter) shost = adapter->scsi_host; if (!shost) return; - fc_remove_host(shost); scsi_remove_host(shost); scsi_host_put(shost); adapter->scsi_host = NULL; @@ -904,18 +906,6 @@ zfcp_get_node_name(struct scsi_target *starget) read_unlock_irqrestore(&zfcp_data.config_lock, flags); } -void -zfcp_set_fc_host_attrs(struct zfcp_adapter *adapter) -{ - struct Scsi_Host *shost = adapter->scsi_host; - - fc_host_node_name(shost) = adapter->wwnn; - fc_host_port_name(shost) = adapter->wwpn; - strncpy(fc_host_serial_number(shost), adapter->serial_number, - min(FC_SERIAL_NUMBER_SIZE, 32)); - fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; -} - struct fc_function_template zfcp_transport_functions = { .get_starget_port_id = zfcp_get_port_id, .get_starget_port_name = zfcp_get_port_name, @@ -923,11 +913,6 @@ struct fc_function_template zfcp_transport_functions = { .show_starget_port_id = 1, .show_starget_port_name = 1, .show_starget_node_name = 1, - .show_rport_supported_classes = 1, - .show_host_node_name = 1, - .show_host_port_name = 1, - .show_host_supported_classes = 1, - .show_host_serial_number = 1, }; /** diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index e822ca0e97cf..51292f269ce5 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -2971,22 +2971,23 @@ static void * dev_seq_start(struct seq_file *s, loff_t *pos) { struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL); - s->private = it; if (! it) return NULL; - if (NULL == sg_dev_arr) - return NULL; + goto err1; it->index = *pos; it->max = sg_last_dev(); if (it->index >= it->max) - return NULL; + goto err1; return it; +err1: + kfree(it); + return NULL; } static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos) { - struct sg_proc_deviter * it = s->private; + struct sg_proc_deviter * it = (struct sg_proc_deviter *) v; *pos = ++it->index; return (it->index < it->max) ? it : NULL; @@ -2994,7 +2995,7 @@ static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos) static void dev_seq_stop(struct seq_file *s, void *v) { - kfree(s->private); + kfree (v); } static int sg_proc_open_dev(struct inode *inode, struct file *file) diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index 3497125189df..30ab70ce5547 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -643,7 +643,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) netfid, length, pfLock->fl_start, numUnlock, numLock, lockType, wait_flag); - if (pfLock->fl_flags & FL_POSIX) + if (rc == 0 && (pfLock->fl_flags & FL_POSIX)) posix_lock_file_wait(file, pfLock); FreeXid(xid); return rc; diff --git a/trunk/fs/hppfs/hppfs_kern.c b/trunk/fs/hppfs/hppfs_kern.c index 52930915bad8..ff150fedb981 100644 --- a/trunk/fs/hppfs/hppfs_kern.c +++ b/trunk/fs/hppfs/hppfs_kern.c @@ -38,7 +38,7 @@ struct hppfs_inode_info { static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) { - return container_of(inode, struct hppfs_inode_info, vfs_inode); + return(list_entry(inode, struct hppfs_inode_info, vfs_inode)); } #define HPPFS_SUPER_MAGIC 0xb00000ee @@ -662,36 +662,42 @@ static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen) { struct file *proc_file; struct dentry *proc_dentry; - int ret; + int (*readlink)(struct dentry *, char *, int); + int err, n; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); - if (IS_ERR(proc_file)) - return PTR_ERR(proc_file); + err = PTR_ERR(proc_dentry); + if(IS_ERR(proc_dentry)) + return(err); - ret = proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer, buflen); + readlink = proc_dentry->d_inode->i_op->readlink; + n = (*readlink)(proc_dentry, buffer, buflen); fput(proc_file); - return ret; + return(n); } -static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) +static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) { struct file *proc_file; struct dentry *proc_dentry; - void *ret; + int (*follow_link)(struct dentry *, struct nameidata *); + int err, n; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); - if (IS_ERR(proc_file)) - return proc_file; + err = PTR_ERR(proc_dentry); + if(IS_ERR(proc_dentry)) + return(err); - ret = proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd); + follow_link = proc_dentry->d_inode->i_op->follow_link; + n = (*follow_link)(proc_dentry, nd); fput(proc_file); - return ret; + return(n); } static struct inode_operations hppfs_dir_iops = { diff --git a/trunk/fs/inotify.c b/trunk/fs/inotify.c index 2e4e2a57708c..868901b1e779 100644 --- a/trunk/fs/inotify.c +++ b/trunk/fs/inotify.c @@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct inotify_device *dev, do { if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL))) return -ENOSPC; - ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd); + ret = idr_get_new_above(&dev->idr, watch, dev->last_wd, &watch->wd); } while (ret == -EAGAIN); return ret; diff --git a/trunk/fs/sysfs/inode.c b/trunk/fs/sysfs/inode.c index 970a33f03299..d727dc960634 100644 --- a/trunk/fs/sysfs/inode.c +++ b/trunk/fs/sysfs/inode.c @@ -228,10 +228,6 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) struct sysfs_dirent * sd; struct sysfs_dirent * parent_sd = dir->d_fsdata; - if (dir->d_inode == NULL) - /* no inode means this hasn't been made visible yet */ - return; - down(&dir->d_inode->i_sem); list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { if (!sd->s_element) diff --git a/trunk/include/asm-m68k/page.h b/trunk/include/asm-m68k/page.h index 206313e2a817..99a516709210 100644 --- a/trunk/include/asm-m68k/page.h +++ b/trunk/include/asm-m68k/page.h @@ -138,13 +138,13 @@ extern unsigned long m68k_memoffset; #define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset) #define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset)) #else -#define __pa(vaddr) virt_to_phys((void *)(vaddr)) -#define __va(paddr) phys_to_virt((unsigned long)(paddr)) +#define __pa(vaddr) virt_to_phys((void *)vaddr) +#define __va(paddr) phys_to_virt((unsigned long)paddr) #endif #else /* !CONFIG_SUN3 */ /* This #define is a horrible hack to suppress lots of warnings. --m */ -#define __pa(x) ___pa((unsigned long)(x)) +#define __pa(x) ___pa((unsigned long)x) static inline unsigned long ___pa(unsigned long x) { if(x == 0) diff --git a/trunk/include/asm-ppc64/bug.h b/trunk/include/asm-ppc64/bug.h index 160178278861..169868fa307d 100644 --- a/trunk/include/asm-ppc64/bug.h +++ b/trunk/include/asm-ppc64/bug.h @@ -43,8 +43,8 @@ struct bug_entry *find_bug(unsigned long bugaddr); ".section __bug_table,\"a\"\n\t" \ " .llong 1b,%1,%2,%3\n" \ ".previous" \ - : : "r" ((long long)(x)), "i" (__LINE__), \ - "i" (__FILE__), "i" (__FUNCTION__)); \ + : : "r" (x), "i" (__LINE__), "i" (__FILE__), \ + "i" (__FUNCTION__)); \ } while (0) #define WARN_ON(x) do { \ @@ -53,8 +53,7 @@ struct bug_entry *find_bug(unsigned long bugaddr); ".section __bug_table,\"a\"\n\t" \ " .llong 1b,%1,%2,%3\n" \ ".previous" \ - : : "r" ((long long)(x)), \ - "i" (__LINE__ + BUG_WARNING_TRAP), \ + : : "r" (x), "i" (__LINE__ + BUG_WARNING_TRAP), \ "i" (__FILE__), "i" (__FUNCTION__)); \ } while (0) diff --git a/trunk/include/asm-x86_64/e820.h b/trunk/include/asm-x86_64/e820.h index e682edc24a68..8e94edf0b984 100644 --- a/trunk/include/asm-x86_64/e820.h +++ b/trunk/include/asm-x86_64/e820.h @@ -51,8 +51,6 @@ extern int e820_mapped(unsigned long start, unsigned long end, unsigned type); extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); extern void e820_setup_gap(void); -extern unsigned long e820_hole_size(unsigned long start_pfn, - unsigned long end_pfn); extern void __init parse_memopt(char *p, char **end); diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 8ab1b4e518b8..e0d296c5b302 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -627,14 +627,6 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial) * Call with cpuset_sem held. May nest a call to the * lock_cpu_hotplug()/unlock_cpu_hotplug() pair. */ - -/* - * Hack to avoid 2.6.13 partial node dynamic sched domain bug. - * Disable letting 'cpu_exclusive' cpusets define dynamic sched - * domains, until the sched domain can handle partial nodes. - * Remove this #if hackery when sched domains fixed. - */ -#if 0 static void update_cpu_domains(struct cpuset *cur) { struct cpuset *c, *par = cur->parent; @@ -643,6 +635,23 @@ static void update_cpu_domains(struct cpuset *cur) if (par == NULL || cpus_empty(cur->cpus_allowed)) return; + /* + * Hack to avoid 2.6.13 partial node dynamic sched domain bug. + * Require the 'cpu_exclusive' cpuset to include all (or none) + * of the CPUs on each node, or return w/o changing sched domains. + * Remove this hack when dynamic sched domains fixed. + */ + { + int i, j; + + for_each_cpu_mask(i, cur->cpus_allowed) { + for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { + if (!cpu_isset(j, cur->cpus_allowed)) + return; + } + } + } + /* * Get all cpus from parent's cpus_allowed not part of exclusive * children @@ -675,11 +684,6 @@ static void update_cpu_domains(struct cpuset *cur) partition_sched_domains(&pspan, &cspan); unlock_cpu_hotplug(); } -#else -static void update_cpu_domains(struct cpuset *cur) -{ -} -#endif static int update_cpumask(struct cpuset *cs, char *buf) { diff --git a/trunk/lib/idr.c b/trunk/lib/idr.c index 6415d053e2bf..c5be889de449 100644 --- a/trunk/lib/idr.c +++ b/trunk/lib/idr.c @@ -207,7 +207,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id) } /** - * idr_get_new_above - allocate new idr entry above or equal to a start id + * idr_get_new_above - allocate new idr entry above a start id * @idp: idr handle * @ptr: pointer you want associated with the ide * @start_id: id to start search at diff --git a/trunk/net/ipv4/fib_trie.c b/trunk/net/ipv4/fib_trie.c index 45efd5f4741b..a701405fab0b 100644 --- a/trunk/net/ipv4/fib_trie.c +++ b/trunk/net/ipv4/fib_trie.c @@ -1333,9 +1333,9 @@ err:; } static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *plen, const struct flowi *flp, - struct fib_result *res) + struct fib_result *res, int *err) { - int err, i; + int i; t_key mask; struct leaf_info *li; struct hlist_head *hhead = &l->list; @@ -1348,18 +1348,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *pl if (l->key != (key & mask)) continue; - if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) { + if (((*err) = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) == 0) { *plen = i; #ifdef CONFIG_IP_FIB_TRIE_STATS t->stats.semantic_match_passed++; #endif - return err; + return 1; } #ifdef CONFIG_IP_FIB_TRIE_STATS t->stats.semantic_match_miss++; #endif } - return 1; + return 0; } static int @@ -1386,7 +1386,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result /* Just a leaf? */ if (IS_LEAF(n)) { - if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0) + if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) goto found; goto failed; } @@ -1508,7 +1508,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result continue; } if (IS_LEAF(n)) { - if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0) + if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) goto found; } backtrace: