Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
net/bluetooth/l2cap_core.c

+486 -343
-1
Documentation/filesystems/nilfs2.txt
··· 40 40 - POSIX ACLs 41 41 - quotas 42 42 - fsck 43 - - resize 44 43 - defragmentation 45 44 46 45 Mount options
+2 -2
arch/arm/mach-davinci/board-dm365-evm.c
··· 520 520 */ 521 521 if (have_imager()) { 522 522 label = "HD imager"; 523 - mux |= 1; 523 + mux |= 2; 524 524 525 525 /* externally mux MMC1/ENET/AIC33 to imager */ 526 526 mux |= BIT(6) | BIT(5) | BIT(3); ··· 540 540 resets &= ~BIT(1); 541 541 542 542 if (have_tvp7002()) { 543 - mux |= 2; 543 + mux |= 1; 544 544 resets &= ~BIT(2); 545 545 label = "tvp7002 HD"; 546 546 } else {
+16 -5
arch/arm/mach-davinci/gpio.c
··· 254 254 { 255 255 struct davinci_gpio_regs __iomem *g; 256 256 u32 mask = 0xffff; 257 + struct davinci_gpio_controller *d; 257 258 258 - g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc); 259 + d = (struct davinci_gpio_controller *)irq_desc_get_handler_data(desc); 260 + g = (struct davinci_gpio_regs __iomem *)d->regs; 259 261 260 262 /* we only care about one bank */ 261 263 if (irq & 1) ··· 276 274 if (!status) 277 275 break; 278 276 __raw_writel(status, &g->intstat); 279 - if (irq & 1) 280 - status >>= 16; 281 277 282 278 /* now demux them to the right lowlevel handler */ 283 - n = (int)irq_get_handler_data(irq); 279 + n = d->irq_base; 280 + if (irq & 1) { 281 + n += 16; 282 + status >>= 16; 283 + } 284 + 284 285 while (status) { 285 286 res = ffs(status); 286 287 n += res; ··· 429 424 430 425 /* set up all irqs in this bank */ 431 426 irq_set_chained_handler(bank_irq, gpio_irq_handler); 432 - irq_set_handler_data(bank_irq, (__force void *)g); 427 + 428 + /* 429 + * Each chip handles 32 gpios, and each irq bank consists of 16 430 + * gpio irqs. Pass the irq bank's corresponding controller to 431 + * the chained irq handler. 432 + */ 433 + irq_set_handler_data(bank_irq, &chips[gpio / 32]); 433 434 434 435 for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { 435 436 irq_set_chip(irq, &gpio_irqchip);
+6
arch/arm/mach-davinci/irq.c
··· 52 52 struct irq_chip_type *ct; 53 53 54 54 gc = irq_alloc_generic_chip("AINTC", 1, irq_start, base, handle_edge_irq); 55 + if (!gc) { 56 + pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", 57 + __func__, irq_start); 58 + return; 59 + } 60 + 55 61 ct = gc->chip_types; 56 62 ct->chip.irq_ack = irq_gc_ack_set_bit; 57 63 ct->chip.irq_mask = irq_gc_mask_clr_bit;
+8 -2
arch/arm/mach-ixp4xx/common.c
··· 419 419 /* 420 420 * clocksource 421 421 */ 422 + 423 + static cycle_t ixp4xx_clocksource_read(struct clocksource *c) 424 + { 425 + return *IXP4XX_OSTS; 426 + } 427 + 422 428 unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; 423 429 EXPORT_SYMBOL(ixp4xx_timer_freq); 424 430 static void __init ixp4xx_clocksource_init(void) 425 431 { 426 432 init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); 427 433 428 - clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32, 429 - clocksource_mmio_readl_up); 434 + clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, 435 + ixp4xx_clocksource_read); 430 436 } 431 437 432 438 /*
+7 -7
arch/arm/mach-s3c64xx/dma.c
··· 113 113 return chan; 114 114 } 115 115 116 - int s3c2410_dma_config(unsigned int channel, int xferunit) 116 + int s3c2410_dma_config(enum dma_ch channel, int xferunit) 117 117 { 118 118 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 119 119 ··· 297 297 return 0; 298 298 } 299 299 300 - int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) 300 + int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op) 301 301 { 302 302 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 303 303 ··· 331 331 * 332 332 */ 333 333 334 - int s3c2410_dma_enqueue(unsigned int channel, void *id, 334 + int s3c2410_dma_enqueue(enum dma_ch channel, void *id, 335 335 dma_addr_t data, int size) 336 336 { 337 337 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); ··· 415 415 EXPORT_SYMBOL(s3c2410_dma_enqueue); 416 416 417 417 418 - int s3c2410_dma_devconfig(unsigned int channel, 418 + int s3c2410_dma_devconfig(enum dma_ch channel, 419 419 enum s3c2410_dmasrc source, 420 420 unsigned long devaddr) 421 421 { ··· 463 463 EXPORT_SYMBOL(s3c2410_dma_devconfig); 464 464 465 465 466 - int s3c2410_dma_getposition(unsigned int channel, 466 + int s3c2410_dma_getposition(enum dma_ch channel, 467 467 dma_addr_t *src, dma_addr_t *dst) 468 468 { 469 469 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); ··· 487 487 * get control of an dma channel 488 488 */ 489 489 490 - int s3c2410_dma_request(unsigned int channel, 490 + int s3c2410_dma_request(enum dma_ch channel, 491 491 struct s3c2410_dma_client *client, 492 492 void *dev) 493 493 { ··· 533 533 * allowed to go through. 534 534 */ 535 535 536 - int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) 536 + int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client) 537 537 { 538 538 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 539 539 unsigned long flags;
+6 -6
arch/arm/plat-s3c24xx/dma.c
··· 712 712 * get control of an dma channel 713 713 */ 714 714 715 - int s3c2410_dma_request(unsigned int channel, 715 + int s3c2410_dma_request(enum dma_ch channel, 716 716 struct s3c2410_dma_client *client, 717 717 void *dev) 718 718 { ··· 783 783 * allowed to go through. 784 784 */ 785 785 786 - int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) 786 + int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client) 787 787 { 788 788 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 789 789 unsigned long flags; ··· 974 974 } 975 975 976 976 int 977 - s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) 977 + s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op) 978 978 { 979 979 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 980 980 ··· 1021 1021 * xfersize: size of unit in bytes (1,2,4) 1022 1022 */ 1023 1023 1024 - int s3c2410_dma_config(unsigned int channel, 1024 + int s3c2410_dma_config(enum dma_ch channel, 1025 1025 int xferunit) 1026 1026 { 1027 1027 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); ··· 1100 1100 * devaddr: physical address of the source 1101 1101 */ 1102 1102 1103 - int s3c2410_dma_devconfig(unsigned int channel, 1103 + int s3c2410_dma_devconfig(enum dma_ch channel, 1104 1104 enum s3c2410_dmasrc source, 1105 1105 unsigned long devaddr) 1106 1106 { ··· 1173 1173 * returns the current transfer points for the dma source and destination 1174 1174 */ 1175 1175 1176 - int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst) 1176 + int s3c2410_dma_getposition(enum dma_ch channel, dma_addr_t *src, dma_addr_t *dst) 1177 1177 { 1178 1178 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 1179 1179
+3 -3
arch/arm/plat-samsung/dma.c
··· 41 41 * irq? 42 42 */ 43 43 44 - int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn) 44 + int s3c2410_dma_set_opfn(enum dma_ch channel, s3c2410_dma_opfn_t rtn) 45 45 { 46 46 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 47 47 ··· 56 56 } 57 57 EXPORT_SYMBOL(s3c2410_dma_set_opfn); 58 58 59 - int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn) 59 + int s3c2410_dma_set_buffdone_fn(enum dma_ch channel, s3c2410_dma_cbfn_t rtn) 60 60 { 61 61 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 62 62 ··· 71 71 } 72 72 EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn); 73 73 74 - int s3c2410_dma_setflags(unsigned int channel, unsigned int flags) 74 + int s3c2410_dma_setflags(enum dma_ch channel, unsigned int flags) 75 75 { 76 76 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); 77 77
+11 -10
arch/arm/plat-samsung/include/plat/dma.h
··· 42 42 }; 43 43 44 44 struct s3c2410_dma_chan; 45 + enum dma_ch; 45 46 46 47 /* s3c2410_dma_cbfn_t 47 48 * ··· 63 62 * request a dma channel exclusivley 64 63 */ 65 64 66 - extern int s3c2410_dma_request(unsigned int channel, 65 + extern int s3c2410_dma_request(enum dma_ch channel, 67 66 struct s3c2410_dma_client *, void *dev); 68 67 69 68 ··· 72 71 * change the state of the dma channel 73 72 */ 74 73 75 - extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op); 74 + extern int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op); 76 75 77 76 /* s3c2410_dma_setflags 78 77 * 79 78 * set the channel's flags to a given state 80 79 */ 81 80 82 - extern int s3c2410_dma_setflags(unsigned int channel, 81 + extern int s3c2410_dma_setflags(enum dma_ch channel, 83 82 unsigned int flags); 84 83 85 84 /* s3c2410_dma_free ··· 87 86 * free the dma channel (will also abort any outstanding operations) 88 87 */ 89 88 90 - extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *); 89 + extern int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *); 91 90 92 91 /* s3c2410_dma_enqueue 93 92 * ··· 96 95 * drained before the buffer is given to the DMA system. 97 96 */ 98 97 99 - extern int s3c2410_dma_enqueue(unsigned int channel, void *id, 98 + extern int s3c2410_dma_enqueue(enum dma_ch channel, void *id, 100 99 dma_addr_t data, int size); 101 100 102 101 /* s3c2410_dma_config ··· 104 103 * configure the dma channel 105 104 */ 106 105 107 - extern int s3c2410_dma_config(unsigned int channel, int xferunit); 106 + extern int s3c2410_dma_config(enum dma_ch channel, int xferunit); 108 107 109 108 /* s3c2410_dma_devconfig 110 109 * 111 110 * configure the device we're talking to 112 111 */ 113 112 114 - extern int s3c2410_dma_devconfig(unsigned int channel, 113 + extern int s3c2410_dma_devconfig(enum dma_ch channel, 115 114 enum s3c2410_dmasrc source, unsigned long devaddr); 116 115 117 116 /* s3c2410_dma_getposition ··· 119 118 * get the position that the dma transfer is currently at 120 119 */ 121 120 122 - extern int s3c2410_dma_getposition(unsigned int channel, 121 + extern int s3c2410_dma_getposition(enum dma_ch channel, 123 122 dma_addr_t *src, dma_addr_t *dest); 124 123 125 - extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn); 126 - extern int s3c2410_dma_set_buffdone_fn(unsigned int, s3c2410_dma_cbfn_t rtn); 124 + extern int s3c2410_dma_set_opfn(enum dma_ch, s3c2410_dma_opfn_t rtn); 125 + extern int s3c2410_dma_set_buffdone_fn(enum dma_ch, s3c2410_dma_cbfn_t rtn); 127 126 128 127
+7
arch/arm/plat-samsung/irq-uart.c
··· 54 54 55 55 gc = irq_alloc_generic_chip("s3c-uart", 1, uirq->base_irq, reg_base, 56 56 handle_level_irq); 57 + 58 + if (!gc) { 59 + pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", 60 + __func__, uirq->base_irq); 61 + return; 62 + } 63 + 57 64 ct = gc->chip_types; 58 65 ct->chip.irq_ack = irq_gc_ack_set_bit; 59 66 ct->chip.irq_mask = irq_gc_mask_set_bit;
+7
arch/arm/plat-samsung/irq-vic-timer.c
··· 54 54 55 55 s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq, 56 56 S3C64XX_TINT_CSTAT, handle_level_irq); 57 + 58 + if (!s3c_tgc) { 59 + pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n", 60 + __func__, timer_irq); 61 + return; 62 + } 63 + 57 64 ct = s3c_tgc->chip_types; 58 65 ct->chip.irq_mask = irq_gc_mask_clr_bit; 59 66 ct->chip.irq_unmask = irq_gc_mask_set_bit;
+6 -16
arch/mips/kernel/i8259.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/kernel.h> 16 16 #include <linux/spinlock.h> 17 - #include <linux/sysdev.h> 17 + #include <linux/syscore_ops.h> 18 18 #include <linux/irq.h> 19 19 20 20 #include <asm/i8259.h> ··· 215 215 } 216 216 } 217 217 218 - static int i8259A_resume(struct sys_device *dev) 218 + static void i8259A_resume(void) 219 219 { 220 220 if (i8259A_auto_eoi >= 0) 221 221 init_8259A(i8259A_auto_eoi); 222 - return 0; 223 222 } 224 223 225 - static int i8259A_shutdown(struct sys_device *dev) 224 + static void i8259A_shutdown(void) 226 225 { 227 226 /* Put the i8259A into a quiescent state that 228 227 * the kernel initialization code can get it ··· 231 232 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ 232 233 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ 233 234 } 234 - return 0; 235 235 } 236 236 237 - static struct sysdev_class i8259_sysdev_class = { 238 - .name = "i8259", 237 + static struct syscore_ops i8259_syscore_ops = { 239 238 .resume = i8259A_resume, 240 239 .shutdown = i8259A_shutdown, 241 240 }; 242 241 243 - static struct sys_device device_i8259A = { 244 - .id = 0, 245 - .cls = &i8259_sysdev_class, 246 - }; 247 - 248 242 static int __init i8259A_init_sysfs(void) 249 243 { 250 - int error = sysdev_class_register(&i8259_sysdev_class); 251 - if (!error) 252 - error = sysdev_register(&device_i8259A); 253 - return error; 244 + register_syscore_ops(&i8259_syscore_ops); 245 + return 0; 254 246 } 255 247 256 248 device_initcall(i8259A_init_sysfs);
+4 -4
arch/sparc/include/asm/irqflags_32.h
··· 18 18 extern unsigned long arch_local_irq_save(void); 19 19 extern void arch_local_irq_enable(void); 20 20 21 - static inline unsigned long arch_local_save_flags(void) 21 + static inline notrace unsigned long arch_local_save_flags(void) 22 22 { 23 23 unsigned long flags; 24 24 ··· 26 26 return flags; 27 27 } 28 28 29 - static inline void arch_local_irq_disable(void) 29 + static inline notrace void arch_local_irq_disable(void) 30 30 { 31 31 arch_local_irq_save(); 32 32 } 33 33 34 - static inline bool arch_irqs_disabled_flags(unsigned long flags) 34 + static inline notrace bool arch_irqs_disabled_flags(unsigned long flags) 35 35 { 36 36 return (flags & PSR_PIL) != 0; 37 37 } 38 38 39 - static inline bool arch_irqs_disabled(void) 39 + static inline notrace bool arch_irqs_disabled(void) 40 40 { 41 41 return arch_irqs_disabled_flags(arch_local_save_flags()); 42 42 }
+7 -7
arch/sparc/include/asm/irqflags_64.h
··· 14 14 15 15 #ifndef __ASSEMBLY__ 16 16 17 - static inline unsigned long arch_local_save_flags(void) 17 + static inline notrace unsigned long arch_local_save_flags(void) 18 18 { 19 19 unsigned long flags; 20 20 ··· 26 26 return flags; 27 27 } 28 28 29 - static inline void arch_local_irq_restore(unsigned long flags) 29 + static inline notrace void arch_local_irq_restore(unsigned long flags) 30 30 { 31 31 __asm__ __volatile__( 32 32 "wrpr %0, %%pil" ··· 36 36 ); 37 37 } 38 38 39 - static inline void arch_local_irq_disable(void) 39 + static inline notrace void arch_local_irq_disable(void) 40 40 { 41 41 __asm__ __volatile__( 42 42 "wrpr %0, %%pil" ··· 46 46 ); 47 47 } 48 48 49 - static inline void arch_local_irq_enable(void) 49 + static inline notrace void arch_local_irq_enable(void) 50 50 { 51 51 __asm__ __volatile__( 52 52 "wrpr 0, %%pil" ··· 56 56 ); 57 57 } 58 58 59 - static inline int arch_irqs_disabled_flags(unsigned long flags) 59 + static inline notrace int arch_irqs_disabled_flags(unsigned long flags) 60 60 { 61 61 return (flags > 0); 62 62 } 63 63 64 - static inline int arch_irqs_disabled(void) 64 + static inline notrace int arch_irqs_disabled(void) 65 65 { 66 66 return arch_irqs_disabled_flags(arch_local_save_flags()); 67 67 } 68 68 69 - static inline unsigned long arch_local_irq_save(void) 69 + static inline notrace unsigned long arch_local_irq_save(void) 70 70 { 71 71 unsigned long flags, tmp; 72 72
+1 -1
arch/sparc/kernel/entry.S
··· 293 293 WRITE_PAUSE 294 294 wr %l4, PSR_ET, %psr 295 295 WRITE_PAUSE 296 - sll %o3, 28, %o2 ! shift for simpler checks below 296 + srl %o3, 28, %o2 ! shift for simpler checks below 297 297 maybe_smp4m_msg_check_single: 298 298 andcc %o2, 0x1, %g0 299 299 beq,a maybe_smp4m_msg_check_mask
+1 -1
arch/sparc/mm/leon_mm.c
··· 226 226 * Leon2 and Leon3 differ in their way of telling cache information 227 227 * 228 228 */ 229 - int leon_flush_needed(void) 229 + int __init leon_flush_needed(void) 230 230 { 231 231 int flush_needed = -1; 232 232 unsigned int ssize, sets;
+11 -1
drivers/acpi/apei/hest.c
··· 139 139 { 140 140 struct platform_device *ghes_dev; 141 141 struct ghes_arr *ghes_arr = data; 142 - int rc; 142 + int rc, i; 143 143 144 144 if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR) 145 145 return 0; 146 146 147 147 if (!((struct acpi_hest_generic *)hest_hdr)->enabled) 148 148 return 0; 149 + for (i = 0; i < ghes_arr->count; i++) { 150 + struct acpi_hest_header *hdr; 151 + ghes_dev = ghes_arr->ghes_devs[i]; 152 + hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data; 153 + if (hdr->source_id == hest_hdr->source_id) { 154 + pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n", 155 + hdr->source_id); 156 + return -EIO; 157 + } 158 + } 149 159 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id); 150 160 if (!ghes_dev) 151 161 return -ENOMEM;
-17
drivers/acpi/osl.c
··· 1333 1333 EXPORT_SYMBOL(acpi_resources_are_enforced); 1334 1334 1335 1335 /* 1336 - * Create and initialize a spinlock. 1337 - */ 1338 - acpi_status 1339 - acpi_os_create_lock(acpi_spinlock *out_handle) 1340 - { 1341 - spinlock_t *lock; 1342 - 1343 - lock = ACPI_ALLOCATE(sizeof(spinlock_t)); 1344 - if (!lock) 1345 - return AE_NO_MEMORY; 1346 - spin_lock_init(lock); 1347 - *out_handle = lock; 1348 - 1349 - return AE_OK; 1350 - } 1351 - 1352 - /* 1353 1336 * Deallocate the memory for a spinlock. 1354 1337 */ 1355 1338 void acpi_os_delete_lock(acpi_spinlock handle)
+1
drivers/gpio/wm831x-gpio.c
··· 180 180 break; 181 181 case WM831X_GPIO_PULL_UP: 182 182 pull = "pullup"; 183 + break; 183 184 default: 184 185 pull = "INVALID PULL"; 185 186 break;
+5 -5
drivers/hwmon/adm1275.c
··· 53 53 info->direct[PSC_VOLTAGE_IN] = true; 54 54 info->direct[PSC_VOLTAGE_OUT] = true; 55 55 info->direct[PSC_CURRENT_OUT] = true; 56 - info->m[PSC_CURRENT_OUT] = 800; 56 + info->m[PSC_CURRENT_OUT] = 807; 57 57 info->b[PSC_CURRENT_OUT] = 20475; 58 58 info->R[PSC_CURRENT_OUT] = -1; 59 59 info->func[0] = PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT; 60 60 61 61 if (config & ADM1275_VRANGE) { 62 - info->m[PSC_VOLTAGE_IN] = 19045; 62 + info->m[PSC_VOLTAGE_IN] = 19199; 63 63 info->b[PSC_VOLTAGE_IN] = 0; 64 64 info->R[PSC_VOLTAGE_IN] = -2; 65 - info->m[PSC_VOLTAGE_OUT] = 19045; 65 + info->m[PSC_VOLTAGE_OUT] = 19199; 66 66 info->b[PSC_VOLTAGE_OUT] = 0; 67 67 info->R[PSC_VOLTAGE_OUT] = -2; 68 68 } else { 69 - info->m[PSC_VOLTAGE_IN] = 6666; 69 + info->m[PSC_VOLTAGE_IN] = 6720; 70 70 info->b[PSC_VOLTAGE_IN] = 0; 71 71 info->R[PSC_VOLTAGE_IN] = -1; 72 - info->m[PSC_VOLTAGE_OUT] = 6666; 72 + info->m[PSC_VOLTAGE_OUT] = 6720; 73 73 info->b[PSC_VOLTAGE_OUT] = 0; 74 74 info->R[PSC_VOLTAGE_OUT] = -1; 75 75 }
+1
drivers/hwmon/asus_atk0110.c
··· 674 674 else 675 675 err = -EIO; 676 676 677 + ACPI_FREE(ret); 677 678 return err; 678 679 } 679 680
+1 -1
drivers/hwmon/it87.c
··· 1538 1538 }; 1539 1539 1540 1540 static const struct attribute_group it87_group_label = { 1541 - .attrs = it87_attributes_vid, 1541 + .attrs = it87_attributes_label, 1542 1542 }; 1543 1543 1544 1544 /* SuperIO detection - will change isa_address if a chip is found */
+11
drivers/hwmon/max1111.c
··· 40 40 struct spi_transfer xfer[2]; 41 41 uint8_t *tx_buf; 42 42 uint8_t *rx_buf; 43 + struct mutex drvdata_lock; 44 + /* protect msg, xfer and buffers from multiple access */ 43 45 }; 44 46 45 47 static int max1111_read(struct device *dev, int channel) ··· 50 48 uint8_t v1, v2; 51 49 int err; 52 50 51 + /* writing to drvdata struct is not thread safe, wait on mutex */ 52 + mutex_lock(&data->drvdata_lock); 53 + 53 54 data->tx_buf[0] = (channel << MAX1111_CTRL_SEL_SH) | 54 55 MAX1111_CTRL_PD0 | MAX1111_CTRL_PD1 | 55 56 MAX1111_CTRL_SGL | MAX1111_CTRL_UNI | MAX1111_CTRL_STR; ··· 60 55 err = spi_sync(data->spi, &data->msg); 61 56 if (err < 0) { 62 57 dev_err(dev, "spi_sync failed with %d\n", err); 58 + mutex_unlock(&data->drvdata_lock); 63 59 return err; 64 60 } 65 61 66 62 v1 = data->rx_buf[0]; 67 63 v2 = data->rx_buf[1]; 64 + 65 + mutex_unlock(&data->drvdata_lock); 68 66 69 67 if ((v1 & 0xc0) || (v2 & 0x3f)) 70 68 return -EINVAL; ··· 184 176 if (err) 185 177 goto err_free_data; 186 178 179 + mutex_init(&data->drvdata_lock); 180 + 187 181 data->spi = spi; 188 182 spi_set_drvdata(spi, data); 189 183 ··· 223 213 224 214 hwmon_device_unregister(data->hwmon_dev); 225 215 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); 216 + mutex_destroy(&data->drvdata_lock); 226 217 kfree(data->rx_buf); 227 218 kfree(data->tx_buf); 228 219 kfree(data);
+10 -10
drivers/hwmon/pmbus_core.c
··· 362 362 * Convert linear sensor values to milli- or micro-units 363 363 * depending on sensor type. 364 364 */ 365 - static int pmbus_reg2data_linear(struct pmbus_data *data, 366 - struct pmbus_sensor *sensor) 365 + static long pmbus_reg2data_linear(struct pmbus_data *data, 366 + struct pmbus_sensor *sensor) 367 367 { 368 368 s16 exponent; 369 369 s32 mantissa; ··· 397 397 else 398 398 val >>= -exponent; 399 399 400 - return (int)val; 400 + return val; 401 401 } 402 402 403 403 /* 404 404 * Convert direct sensor values to milli- or micro-units 405 405 * depending on sensor type. 406 406 */ 407 - static int pmbus_reg2data_direct(struct pmbus_data *data, 408 - struct pmbus_sensor *sensor) 407 + static long pmbus_reg2data_direct(struct pmbus_data *data, 408 + struct pmbus_sensor *sensor) 409 409 { 410 410 long val = (s16) sensor->data; 411 411 long m, b, R; ··· 440 440 R++; 441 441 } 442 442 443 - return (int)((val - b) / m); 443 + return (val - b) / m; 444 444 } 445 445 446 - static int pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor) 446 + static long pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor) 447 447 { 448 - int val; 448 + long val; 449 449 450 450 if (data->info->direct[sensor->class]) 451 451 val = pmbus_reg2data_direct(data, sensor); ··· 619 619 if (!s1 && !s2) 620 620 *val = !!regval; 621 621 else { 622 - int v1, v2; 622 + long v1, v2; 623 623 struct pmbus_sensor *sensor1, *sensor2; 624 624 625 625 sensor1 = &data->sensors[s1]; ··· 661 661 if (sensor->data < 0) 662 662 return sensor->data; 663 663 664 - return snprintf(buf, PAGE_SIZE, "%d\n", pmbus_reg2data(data, sensor)); 664 + return snprintf(buf, PAGE_SIZE, "%ld\n", pmbus_reg2data(data, sensor)); 665 665 } 666 666 667 667 static ssize_t pmbus_set_sensor(struct device *dev,
+8
drivers/media/dvb/dvb-core/dvb_frontend.c
··· 1988 1988 if (dvbdev->users == -1 && fe->ops.ts_bus_ctrl) { 1989 1989 if ((ret = fe->ops.ts_bus_ctrl(fe, 1)) < 0) 1990 1990 goto err0; 1991 + 1992 + /* If we took control of the bus, we need to force 1993 + reinitialization. This is because many ts_bus_ctrl() 1994 + functions strobe the RESET pin on the demod, and if the 1995 + frontend thread already exists then the dvb_init() routine 1996 + won't get called (which is what usually does initial 1997 + register configuration). */ 1998 + fepriv->reinitialise = 1; 1991 1999 } 1992 2000 1993 2001 if ((ret = dvb_generic_open (inode, file)) < 0)
+2 -2
drivers/media/radio/Kconfig
··· 168 168 169 169 config RADIO_MIROPCM20 170 170 tristate "miroSOUND PCM20 radio" 171 - depends on ISA && VIDEO_V4L2 && SND 171 + depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND 172 172 select SND_ISA 173 173 select SND_MIRO 174 174 ---help--- ··· 201 201 202 202 config RADIO_SF16FMR2 203 203 tristate "SF16FMR2 Radio" 204 - depends on ISA && VIDEO_V4L2 204 + depends on ISA && VIDEO_V4L2 && SND 205 205 ---help--- 206 206 Choose Y here if you have one of these FM radio cards. 207 207
+2 -2
drivers/media/radio/si4713-i2c.c
··· 1033 1033 char ps_name[MAX_RDS_PS_NAME + 1]; 1034 1034 1035 1035 len = control->size - 1; 1036 - if (len > MAX_RDS_PS_NAME) { 1036 + if (len < 0 || len > MAX_RDS_PS_NAME) { 1037 1037 rval = -ERANGE; 1038 1038 goto exit; 1039 1039 } ··· 1057 1057 char radio_text[MAX_RDS_RADIO_TEXT + 1]; 1058 1058 1059 1059 len = control->size - 1; 1060 - if (len > MAX_RDS_RADIO_TEXT) { 1060 + if (len < 0 || len > MAX_RDS_RADIO_TEXT) { 1061 1061 rval = -ERANGE; 1062 1062 goto exit; 1063 1063 }
+5 -4
drivers/media/rc/mceusb.c
··· 558 558 inout, data1); 559 559 break; 560 560 case MCE_CMD_S_TIMEOUT: 561 - /* value is in units of 50us, so x*50/100 or x/2 ms */ 561 + /* value is in units of 50us, so x*50/1000 ms */ 562 562 dev_info(dev, "%s receive timeout of %d ms\n", 563 - inout, ((data1 << 8) | data2) / 2); 563 + inout, 564 + ((data1 << 8) | data2) * MCE_TIME_UNIT / 1000); 564 565 break; 565 566 case MCE_CMD_G_TIMEOUT: 566 567 dev_info(dev, "Get receive timeout\n"); ··· 848 847 switch (ir->buf_in[index]) { 849 848 /* 2-byte return value commands */ 850 849 case MCE_CMD_S_TIMEOUT: 851 - ir->rc->timeout = US_TO_NS((hi << 8 | lo) / 2); 850 + ir->rc->timeout = US_TO_NS((hi << 8 | lo) * MCE_TIME_UNIT); 852 851 break; 853 852 854 853 /* 1-byte return value commands */ ··· 1079 1078 rc->priv = ir; 1080 1079 rc->driver_type = RC_DRIVER_IR_RAW; 1081 1080 rc->allowed_protos = RC_TYPE_ALL; 1082 - rc->timeout = US_TO_NS(1000); 1081 + rc->timeout = MS_TO_NS(100); 1083 1082 if (!ir->flags.no_tx) { 1084 1083 rc->s_tx_mask = mceusb_set_tx_mask; 1085 1084 rc->s_tx_carrier = mceusb_set_tx_carrier;
+1 -1
drivers/media/rc/nuvoton-cir.c
··· 1110 1110 rdev->dev.parent = &pdev->dev; 1111 1111 rdev->driver_name = NVT_DRIVER_NAME; 1112 1112 rdev->map_name = RC_MAP_RC6_MCE; 1113 - rdev->timeout = US_TO_NS(1000); 1113 + rdev->timeout = MS_TO_NS(100); 1114 1114 /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */ 1115 1115 rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD); 1116 1116 #if 0
+2 -7
drivers/media/video/cx23885/cx23885-core.c
··· 2060 2060 goto fail_irq; 2061 2061 } 2062 2062 2063 - if (!pci_enable_msi(pci_dev)) 2064 - err = request_irq(pci_dev->irq, cx23885_irq, 2065 - IRQF_DISABLED, dev->name, dev); 2066 - else 2067 - err = request_irq(pci_dev->irq, cx23885_irq, 2068 - IRQF_SHARED | IRQF_DISABLED, dev->name, dev); 2063 + err = request_irq(pci_dev->irq, cx23885_irq, 2064 + IRQF_SHARED | IRQF_DISABLED, dev->name, dev); 2069 2065 if (err < 0) { 2070 2066 printk(KERN_ERR "%s: can't get IRQ %d\n", 2071 2067 dev->name, pci_dev->irq); ··· 2110 2114 2111 2115 /* unregister stuff */ 2112 2116 free_irq(pci_dev->irq, dev); 2113 - pci_disable_msi(pci_dev); 2114 2117 2115 2118 cx23885_dev_unregister(dev); 2116 2119 v4l2_device_unregister(v4l2_dev);
+12 -4
drivers/media/video/tuner-core.c
··· 714 714 * returns 0. 715 715 * This function is needed for boards that have a separate tuner for 716 716 * radio (like devices with tea5767). 717 + * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to 718 + * select a TV frequency. So, t_mode = T_ANALOG_TV could actually 719 + * be used to represent a Digital TV too. 717 720 */ 718 721 static inline int check_mode(struct tuner *t, enum v4l2_tuner_type mode) 719 722 { 720 - if ((1 << mode & t->mode_mask) == 0) 723 + int t_mode; 724 + if (mode == V4L2_TUNER_RADIO) 725 + t_mode = T_RADIO; 726 + else 727 + t_mode = T_ANALOG_TV; 728 + 729 + if ((t_mode & t->mode_mask) == 0) 721 730 return -EINVAL; 722 731 723 732 return 0; ··· 993 984 case V4L2_TUNER_RADIO: 994 985 p = "radio"; 995 986 break; 996 - case V4L2_TUNER_DIGITAL_TV: 987 + case V4L2_TUNER_DIGITAL_TV: /* Used by mt20xx */ 997 988 p = "digital TV"; 998 989 break; 999 990 case V4L2_TUNER_ANALOG_TV: ··· 1144 1135 return 0; 1145 1136 if (vt->type == t->mode && analog_ops->get_afc) 1146 1137 vt->afc = analog_ops->get_afc(&t->fe); 1147 - if (vt->type == V4L2_TUNER_ANALOG_TV) 1138 + if (t->mode != V4L2_TUNER_RADIO) { 1148 1139 vt->capability |= V4L2_TUNER_CAP_NORM; 1149 - if (vt->type != V4L2_TUNER_RADIO) { 1150 1140 vt->rangelow = tv_range[0] * 16; 1151 1141 vt->rangehigh = tv_range[1] * 16; 1152 1142 return 0;
+3 -3
drivers/net/bonding/bond_main.c
··· 1415 1415 return features; 1416 1416 } 1417 1417 1418 - #define BOND_VLAN_FEATURES (NETIF_F_ALL_TX_OFFLOADS | \ 1419 - NETIF_F_SOFT_FEATURES | \ 1420 - NETIF_F_LRO) 1418 + #define BOND_VLAN_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | \ 1419 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ 1420 + NETIF_F_HIGHDMA | NETIF_F_LRO) 1421 1421 1422 1422 static void bond_compute_features(struct bonding *bond) 1423 1423 {
+19 -5
drivers/net/gianfar.c
··· 2287 2287 return 0; 2288 2288 } 2289 2289 2290 + /* Check if rx parser should be activated */ 2291 + void gfar_check_rx_parser_mode(struct gfar_private *priv) 2292 + { 2293 + struct gfar __iomem *regs; 2294 + u32 tempval; 2295 + 2296 + regs = priv->gfargrp[0].regs; 2297 + 2298 + tempval = gfar_read(&regs->rctrl); 2299 + /* If parse is no longer required, then disable parser */ 2300 + if (tempval & RCTRL_REQ_PARSER) 2301 + tempval |= RCTRL_PRSDEP_INIT; 2302 + else 2303 + tempval &= ~RCTRL_PRSDEP_INIT; 2304 + gfar_write(&regs->rctrl, tempval); 2305 + } 2306 + 2290 2307 2291 2308 /* Enables and disables VLAN insertion/extraction */ 2292 2309 static void gfar_vlan_rx_register(struct net_device *dev, ··· 2340 2323 /* Disable VLAN tag extraction */ 2341 2324 tempval = gfar_read(&regs->rctrl); 2342 2325 tempval &= ~RCTRL_VLEX; 2343 - /* If parse is no longer required, then disable parser */ 2344 - if (tempval & RCTRL_REQ_PARSER) 2345 - tempval |= RCTRL_PRSDEP_INIT; 2346 - else 2347 - tempval &= ~RCTRL_PRSDEP_INIT; 2348 2326 gfar_write(&regs->rctrl, tempval); 2327 + 2328 + gfar_check_rx_parser_mode(priv); 2349 2329 } 2350 2330 2351 2331 gfar_change_mtu(dev, dev->mtu);
+2 -1
drivers/net/gianfar.h
··· 286 286 #define RCTRL_PROM 0x00000008 287 287 #define RCTRL_EMEN 0x00000002 288 288 #define RCTRL_REQ_PARSER (RCTRL_VLEX | RCTRL_IPCSEN | \ 289 - RCTRL_TUCSEN) 289 + RCTRL_TUCSEN | RCTRL_FILREN) 290 290 #define RCTRL_CHECKSUMMING (RCTRL_IPCSEN | RCTRL_TUCSEN | \ 291 291 RCTRL_PRSDEP_INIT) 292 292 #define RCTRL_EXTHASH (RCTRL_GHTX) ··· 1182 1182 unsigned long tx_mask, unsigned long rx_mask); 1183 1183 void gfar_init_sysfs(struct net_device *dev); 1184 1184 int gfar_set_features(struct net_device *dev, u32 features); 1185 + extern void gfar_check_rx_parser_mode(struct gfar_private *priv); 1185 1186 1186 1187 extern const struct ethtool_ops gfar_ethtool_ops; 1187 1188
+2 -1
drivers/net/pppoe.c
··· 348 348 349 349 /* Only look at sockets that are using this specific device. */ 350 350 switch (event) { 351 + case NETDEV_CHANGEADDR: 351 352 case NETDEV_CHANGEMTU: 352 - /* A change in mtu is a bad thing, requiring 353 + /* A change in mtu or address is a bad thing, requiring 353 354 * LCP re-negotiation. 354 355 */ 355 356
+5 -3
drivers/net/r6040.c
··· 677 677 if (status & RX_FIFO_FULL) 678 678 dev->stats.rx_fifo_errors++; 679 679 680 - /* Mask off RX interrupt */ 681 - misr &= ~RX_INTS; 682 - napi_schedule(&lp->napi); 680 + if (likely(napi_schedule_prep(&lp->napi))) { 681 + /* Mask off RX interrupt */ 682 + misr &= ~RX_INTS; 683 + __napi_schedule(&lp->napi); 684 + } 683 685 } 684 686 685 687 /* TX interrupt request */
-4
drivers/net/tulip/dmfe.c
··· 879 879 txptr = db->tx_remove_ptr; 880 880 while(db->tx_packet_cnt) { 881 881 tdes0 = le32_to_cpu(txptr->tdes0); 882 - pr_debug("tdes0=%x\n", tdes0); 883 882 if (tdes0 & 0x80000000) 884 883 break; 885 884 ··· 888 889 889 890 /* Transmit statistic counter */ 890 891 if ( tdes0 != 0x7fffffff ) { 891 - pr_debug("tdes0=%x\n", tdes0); 892 892 dev->stats.collisions += (tdes0 >> 3) & 0xf; 893 893 dev->stats.tx_bytes += le32_to_cpu(txptr->tdes1) & 0x7ff; 894 894 if (tdes0 & TDES0_ERR_MASK) { ··· 984 986 /* error summary bit check */ 985 987 if (rdes0 & 0x8000) { 986 988 /* This is a error packet */ 987 - pr_debug("rdes0: %x\n", rdes0); 988 989 dev->stats.rx_errors++; 989 990 if (rdes0 & 1) 990 991 dev->stats.rx_fifo_errors++; ··· 1635 1638 else /* DM9102/DM9102A */ 1636 1639 phy_mode = phy_read(db->ioaddr, 1637 1640 db->phy_addr, 17, db->chip_id) & 0xf000; 1638 - pr_debug("Phy_mode %x\n", phy_mode); 1639 1641 switch (phy_mode) { 1640 1642 case 0x1000: db->op_mode = DMFE_10MHF; break; 1641 1643 case 0x2000: db->op_mode = DMFE_10MFD; break;
+1 -2
drivers/watchdog/Kconfig
··· 599 599 600 600 config HP_WATCHDOG 601 601 tristate "HP ProLiant iLO2+ Hardware Watchdog Timer" 602 - depends on X86 603 - default m 602 + depends on X86 && PCI 604 603 help 605 604 A software monitoring watchdog and NMI sourcing driver. This driver 606 605 will detect lockups and provide a stack trace. This is a driver that
+16 -3
fs/ceph/mds_client.c
··· 1438 1438 struct dentry *temp; 1439 1439 char *path; 1440 1440 int len, pos; 1441 + unsigned seq; 1441 1442 1442 1443 if (dentry == NULL) 1443 1444 return ERR_PTR(-EINVAL); 1444 1445 1445 1446 retry: 1446 1447 len = 0; 1448 + seq = read_seqbegin(&rename_lock); 1449 + rcu_read_lock(); 1447 1450 for (temp = dentry; !IS_ROOT(temp);) { 1448 1451 struct inode *inode = temp->d_inode; 1449 1452 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) ··· 1458 1455 len += 1 + temp->d_name.len; 1459 1456 temp = temp->d_parent; 1460 1457 if (temp == NULL) { 1458 + rcu_read_unlock(); 1461 1459 pr_err("build_path corrupt dentry %p\n", dentry); 1462 1460 return ERR_PTR(-EINVAL); 1463 1461 } 1464 1462 } 1463 + rcu_read_unlock(); 1465 1464 if (len) 1466 1465 len--; /* no leading '/' */ 1467 1466 ··· 1472 1467 return ERR_PTR(-ENOMEM); 1473 1468 pos = len; 1474 1469 path[pos] = 0; /* trailing null */ 1470 + rcu_read_lock(); 1475 1471 for (temp = dentry; !IS_ROOT(temp) && pos != 0; ) { 1476 - struct inode *inode = temp->d_inode; 1472 + struct inode *inode; 1477 1473 1474 + spin_lock(&temp->d_lock); 1475 + inode = temp->d_inode; 1478 1476 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { 1479 1477 dout("build_path path+%d: %p SNAPDIR\n", 1480 1478 pos, temp); ··· 1486 1478 break; 1487 1479 } else { 1488 1480 pos -= temp->d_name.len; 1489 - if (pos < 0) 1481 + if (pos < 0) { 1482 + spin_unlock(&temp->d_lock); 1490 1483 break; 1484 + } 1491 1485 strncpy(path + pos, temp->d_name.name, 1492 1486 temp->d_name.len); 1493 1487 } 1488 + spin_unlock(&temp->d_lock); 1494 1489 if (pos) 1495 1490 path[--pos] = '/'; 1496 1491 temp = temp->d_parent; 1497 1492 if (temp == NULL) { 1493 + rcu_read_unlock(); 1498 1494 pr_err("build_path corrupt dentry\n"); 1499 1495 kfree(path); 1500 1496 return ERR_PTR(-EINVAL); 1501 1497 } 1502 1498 } 1503 - if (pos != 0) { 1499 + rcu_read_unlock(); 1500 + if (pos != 0 || read_seqretry(&rename_lock, seq)) { 1504 1501 pr_err("build_path did not end path lookup where " 1505 1502 "expected, namelen is %d, pos is %d\n", len, pos); 1506 1503 /* presumably this is only possible if racing with a
+26 -68
fs/cifs/cifsfs.c
··· 35 35 #include <linux/delay.h> 36 36 #include <linux/kthread.h> 37 37 #include <linux/freezer.h> 38 + #include <linux/namei.h> 38 39 #include <net/ipv6.h> 39 40 #include "cifsfs.h" 40 41 #include "cifspdu.h" ··· 543 542 static struct dentry * 544 543 cifs_get_root(struct smb_vol *vol, struct super_block *sb) 545 544 { 546 - int xid, rc; 547 - struct inode *inode; 548 - struct qstr name; 549 - struct dentry *dparent = NULL, *dchild = NULL, *alias; 545 + struct dentry *dentry; 550 546 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 551 - unsigned int i, full_len, len; 552 - char *full_path = NULL, *pstart; 547 + char *full_path = NULL; 548 + char *s, *p; 553 549 char sep; 550 + int xid; 554 551 555 552 full_path = cifs_build_path_to_root(vol, cifs_sb, 556 553 cifs_sb_master_tcon(cifs_sb)); ··· 559 560 560 561 xid = GetXid(); 561 562 sep = CIFS_DIR_SEP(cifs_sb); 562 - dparent = dget(sb->s_root); 563 - full_len = strlen(full_path); 564 - full_path[full_len] = sep; 565 - pstart = full_path + 1; 563 + dentry = dget(sb->s_root); 564 + p = s = full_path; 566 565 567 - for (i = 1, len = 0; i <= full_len; i++) { 568 - if (full_path[i] != sep || !len) { 569 - len++; 570 - continue; 571 - } 566 + do { 567 + struct inode *dir = dentry->d_inode; 568 + struct dentry *child; 572 569 573 - full_path[i] = 0; 574 - cFYI(1, "get dentry for %s", pstart); 570 + /* skip separators */ 571 + while (*s == sep) 572 + s++; 573 + if (!*s) 574 + break; 575 + p = s++; 576 + /* next separator */ 577 + while (*s && *s != sep) 578 + s++; 575 579 576 - name.name = pstart; 577 - name.len = len; 578 - name.hash = full_name_hash(pstart, len); 579 - dchild = d_lookup(dparent, &name); 580 - if (dchild == NULL) { 581 - cFYI(1, "not exists"); 582 - dchild = d_alloc(dparent, &name); 583 - if (dchild == NULL) { 584 - dput(dparent); 585 - dparent = ERR_PTR(-ENOMEM); 586 - goto out; 587 - } 588 - } 589 - 590 - cFYI(1, "get inode"); 591 - if (dchild->d_inode == NULL) { 592 - cFYI(1, "not exists"); 593 - inode = NULL; 594 - if (cifs_sb_master_tcon(CIFS_SB(sb))->unix_ext) 595 - rc = cifs_get_inode_info_unix(&inode, full_path, 596 - sb, xid); 597 - else 598 - rc = cifs_get_inode_info(&inode, full_path, 599 - NULL, sb, xid, NULL); 600 - if (rc) { 601 - dput(dchild); 602 - dput(dparent); 603 - dparent = ERR_PTR(rc); 604 - goto out; 605 - } 606 - alias = d_materialise_unique(dchild, inode); 607 - if (alias != NULL) { 608 - dput(dchild); 609 - if (IS_ERR(alias)) { 610 - dput(dparent); 611 - dparent = ERR_PTR(-EINVAL); /* XXX */ 612 - goto out; 613 - } 614 - dchild = alias; 615 - } 616 - } 617 - cFYI(1, "parent %p, child %p", dparent, dchild); 618 - 619 - dput(dparent); 620 - dparent = dchild; 621 - len = 0; 622 - pstart = full_path + i + 1; 623 - full_path[i] = sep; 624 - } 625 - out: 580 + mutex_lock(&dir->i_mutex); 581 + child = lookup_one_len(p, dentry, s - p); 582 + mutex_unlock(&dir->i_mutex); 583 + dput(dentry); 584 + dentry = child; 585 + } while (!IS_ERR(dentry)); 626 586 _FreeXid(xid); 627 587 kfree(full_path); 628 - return dparent; 588 + return dentry; 629 589 } 630 590 631 591 static int cifs_set_super(struct super_block *sb, void *data)
+1 -1
fs/cifs/cifsfs.h
··· 129 129 extern const struct export_operations cifs_export_ops; 130 130 #endif /* CIFS_NFSD_EXPORT */ 131 131 132 - #define CIFS_VERSION "1.73" 132 + #define CIFS_VERSION "1.74" 133 133 #endif /* _CIFSFS_H */
+1 -1
fs/cifs/connect.c
··· 3485 3485 goto out; 3486 3486 } 3487 3487 3488 - snprintf(username, MAX_USERNAME_SIZE, "krb50x%x", fsuid); 3488 + snprintf(username, sizeof(username), "krb50x%x", fsuid); 3489 3489 vol_info->username = username; 3490 3490 vol_info->local_nls = cifs_sb->local_nls; 3491 3491 vol_info->linux_uid = fsuid;
+12 -1
fs/cifs/dir.c
··· 55 55 char dirsep; 56 56 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); 57 57 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); 58 + unsigned seq; 58 59 59 60 if (direntry == NULL) 60 61 return NULL; /* not much we can do if dentry is freed and ··· 69 68 dfsplen = 0; 70 69 cifs_bp_rename_retry: 71 70 namelen = dfsplen; 71 + seq = read_seqbegin(&rename_lock); 72 + rcu_read_lock(); 72 73 for (temp = direntry; !IS_ROOT(temp);) { 73 74 namelen += (1 + temp->d_name.len); 74 75 temp = temp->d_parent; 75 76 if (temp == NULL) { 76 77 cERROR(1, "corrupt dentry"); 78 + rcu_read_unlock(); 77 79 return NULL; 78 80 } 79 81 } 82 + rcu_read_unlock(); 80 83 81 84 full_path = kmalloc(namelen+1, GFP_KERNEL); 82 85 if (full_path == NULL) 83 86 return full_path; 84 87 full_path[namelen] = 0; /* trailing null */ 88 + rcu_read_lock(); 85 89 for (temp = direntry; !IS_ROOT(temp);) { 90 + spin_lock(&temp->d_lock); 86 91 namelen -= 1 + temp->d_name.len; 87 92 if (namelen < 0) { 93 + spin_unlock(&temp->d_lock); 88 94 break; 89 95 } else { 90 96 full_path[namelen] = dirsep; ··· 99 91 temp->d_name.len); 100 92 cFYI(0, "name: %s", full_path + namelen); 101 93 } 94 + spin_unlock(&temp->d_lock); 102 95 temp = temp->d_parent; 103 96 if (temp == NULL) { 104 97 cERROR(1, "corrupt dentry"); 98 + rcu_read_unlock(); 105 99 kfree(full_path); 106 100 return NULL; 107 101 } 108 102 } 109 - if (namelen != dfsplen) { 103 + rcu_read_unlock(); 104 + if (namelen != dfsplen || read_seqretry(&rename_lock, seq)) { 110 105 cERROR(1, "did not end path lookup where expected namelen is %d", 111 106 namelen); 112 107 /* presumably this is only possible if racing with a rename
+5 -5
fs/cifs/sess.c
··· 428 428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 429 429 flags |= NTLMSSP_NEGOTIATE_SIGN; 430 430 if (!ses->server->session_estab) 431 - flags |= NTLMSSP_NEGOTIATE_KEY_XCH | 432 - NTLMSSP_NEGOTIATE_EXTENDED_SEC; 431 + flags |= NTLMSSP_NEGOTIATE_KEY_XCH; 433 432 } 434 433 435 434 sec_blob->NegotiateFlags = cpu_to_le32(flags); ··· 464 465 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | 465 466 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; 466 467 if (ses->server->sec_mode & 467 - (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 468 + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 468 469 flags |= NTLMSSP_NEGOTIATE_SIGN; 469 - if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED) 470 - flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; 470 + if (!ses->server->session_estab) 471 + flags |= NTLMSSP_NEGOTIATE_KEY_XCH; 472 + } 471 473 472 474 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); 473 475 sec_blob->NegotiateFlags = cpu_to_le32(flags);
+12 -10
fs/cramfs/inode.c
··· 37 37 /* These macros may change in future, to provide better st_ino semantics. */ 38 38 #define OFFSET(x) ((x)->i_ino) 39 39 40 - static unsigned long cramino(struct cramfs_inode *cino, unsigned int offset) 40 + static unsigned long cramino(const struct cramfs_inode *cino, unsigned int offset) 41 41 { 42 42 if (!cino->offset) 43 43 return offset + 1; ··· 61 61 } 62 62 63 63 static struct inode *get_cramfs_inode(struct super_block *sb, 64 - struct cramfs_inode *cramfs_inode, unsigned int offset) 64 + const struct cramfs_inode *cramfs_inode, unsigned int offset) 65 65 { 66 66 struct inode *inode; 67 67 static struct timespec zerotime; ··· 317 317 /* Set it all up.. */ 318 318 sb->s_op = &cramfs_ops; 319 319 root = get_cramfs_inode(sb, &super.root, 0); 320 - if (!root) 320 + if (IS_ERR(root)) 321 321 goto out; 322 322 sb->s_root = d_alloc_root(root); 323 323 if (!sb->s_root) { ··· 423 423 static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 424 424 { 425 425 unsigned int offset = 0; 426 + struct inode *inode = NULL; 426 427 int sorted; 427 428 428 429 mutex_lock(&read_mutex); ··· 450 449 451 450 for (;;) { 452 451 if (!namelen) { 453 - mutex_unlock(&read_mutex); 454 - return ERR_PTR(-EIO); 452 + inode = ERR_PTR(-EIO); 453 + goto out; 455 454 } 456 455 if (name[namelen-1]) 457 456 break; ··· 463 462 if (retval > 0) 464 463 continue; 465 464 if (!retval) { 466 - struct cramfs_inode entry = *de; 467 - mutex_unlock(&read_mutex); 468 - d_add(dentry, get_cramfs_inode(dir->i_sb, &entry, dir_off)); 469 - return NULL; 465 + inode = get_cramfs_inode(dir->i_sb, de, dir_off); 466 + break; 470 467 } 471 468 /* else (retval < 0) */ 472 469 if (sorted) 473 470 break; 474 471 } 472 + out: 475 473 mutex_unlock(&read_mutex); 476 - d_add(dentry, NULL); 474 + if (IS_ERR(inode)) 475 + return ERR_CAST(inode); 476 + d_add(dentry, inode); 477 477 return NULL; 478 478 } 479 479
+34 -17
fs/dcache.c
··· 2213 2213 * The hash value has to match the hash queue that the dentry is on.. 2214 2214 */ 2215 2215 /* 2216 - * d_move - move a dentry 2216 + * __d_move - move a dentry 2217 2217 * @dentry: entry to move 2218 2218 * @target: new dentry 2219 2219 * 2220 2220 * Update the dcache to reflect the move of a file name. Negative 2221 - * dcache entries should not be moved in this way. 2221 + * dcache entries should not be moved in this way. Caller hold 2222 + * rename_lock. 2222 2223 */ 2223 - void d_move(struct dentry * dentry, struct dentry * target) 2224 + static void __d_move(struct dentry * dentry, struct dentry * target) 2224 2225 { 2225 2226 if (!dentry->d_inode) 2226 2227 printk(KERN_WARNING "VFS: moving negative dcache entry\n"); 2227 2228 2228 2229 BUG_ON(d_ancestor(dentry, target)); 2229 2230 BUG_ON(d_ancestor(target, dentry)); 2230 - 2231 - write_seqlock(&rename_lock); 2232 2231 2233 2232 dentry_lock_for_move(dentry, target); 2234 2233 ··· 2274 2275 spin_unlock(&target->d_lock); 2275 2276 fsnotify_d_move(dentry); 2276 2277 spin_unlock(&dentry->d_lock); 2278 + } 2279 + 2280 + /* 2281 + * d_move - move a dentry 2282 + * @dentry: entry to move 2283 + * @target: new dentry 2284 + * 2285 + * Update the dcache to reflect the move of a file name. Negative 2286 + * dcache entries should not be moved in this way. 2287 + */ 2288 + void d_move(struct dentry *dentry, struct dentry *target) 2289 + { 2290 + write_seqlock(&rename_lock); 2291 + __d_move(dentry, target); 2277 2292 write_sequnlock(&rename_lock); 2278 2293 } 2279 2294 EXPORT_SYMBOL(d_move); ··· 2315 2302 * This helper attempts to cope with remotely renamed directories 2316 2303 * 2317 2304 * It assumes that the caller is already holding 2318 - * dentry->d_parent->d_inode->i_mutex and the inode->i_lock 2305 + * dentry->d_parent->d_inode->i_mutex, inode->i_lock and rename_lock 2319 2306 * 2320 2307 * Note: If ever the locking in lock_rename() changes, then please 2321 2308 * remember to update this too... ··· 2330 2317 if (alias->d_parent == dentry->d_parent) 2331 2318 goto out_unalias; 2332 2319 2333 - /* Check for loops */ 2334 - ret = ERR_PTR(-ELOOP); 2335 - if (d_ancestor(alias, dentry)) 2336 - goto out_err; 2337 - 2338 2320 /* See lock_rename() */ 2339 2321 ret = ERR_PTR(-EBUSY); 2340 2322 if (!mutex_trylock(&dentry->d_sb->s_vfs_rename_mutex)) ··· 2339 2331 goto out_err; 2340 2332 m2 = &alias->d_parent->d_inode->i_mutex; 2341 2333 out_unalias: 2342 - d_move(alias, dentry); 2334 + __d_move(alias, dentry); 2343 2335 ret = alias; 2344 2336 out_err: 2345 2337 spin_unlock(&inode->i_lock); ··· 2424 2416 alias = __d_find_alias(inode, 0); 2425 2417 if (alias) { 2426 2418 actual = alias; 2427 - /* Is this an anonymous mountpoint that we could splice 2428 - * into our tree? */ 2429 - if (IS_ROOT(alias)) { 2419 + write_seqlock(&rename_lock); 2420 + 2421 + if (d_ancestor(alias, dentry)) { 2422 + /* Check for loops */ 2423 + actual = ERR_PTR(-ELOOP); 2424 + } else if (IS_ROOT(alias)) { 2425 + /* Is this an anonymous mountpoint that we 2426 + * could splice into our tree? */ 2430 2427 __d_materialise_dentry(dentry, alias); 2428 + write_sequnlock(&rename_lock); 2431 2429 __d_drop(alias); 2432 2430 goto found; 2431 + } else { 2432 + /* Nope, but we must(!) avoid directory 2433 + * aliasing */ 2434 + actual = __d_unalias(inode, dentry, alias); 2433 2435 } 2434 - /* Nope, but we must(!) avoid directory aliasing */ 2435 - actual = __d_unalias(inode, dentry, alias); 2436 + write_sequnlock(&rename_lock); 2436 2437 if (IS_ERR(actual)) 2437 2438 dput(alias); 2438 2439 goto out_nolock;
+1 -1
fs/exofs/super.c
··· 913 913 unsigned long ino = exofs_parent_ino(child); 914 914 915 915 if (!ino) 916 - return NULL; 916 + return ERR_PTR(-ESTALE); 917 917 918 918 return d_obtain_alias(exofs_iget(child->d_inode->i_sb, ino)); 919 919 }
+3
fs/gfs2/aops.c
··· 1069 1069 return 0; 1070 1070 1071 1071 gfs2_log_lock(sdp); 1072 + spin_lock(&sdp->sd_ail_lock); 1072 1073 head = bh = page_buffers(page); 1073 1074 do { 1074 1075 if (atomic_read(&bh->b_count)) ··· 1081 1080 goto not_possible; 1082 1081 bh = bh->b_this_page; 1083 1082 } while(bh != head); 1083 + spin_unlock(&sdp->sd_ail_lock); 1084 1084 gfs2_log_unlock(sdp); 1085 1085 1086 1086 head = bh = page_buffers(page); ··· 1114 1112 WARN_ON(buffer_dirty(bh)); 1115 1113 WARN_ON(buffer_pinned(bh)); 1116 1114 cannot_release: 1115 + spin_unlock(&sdp->sd_ail_lock); 1117 1116 gfs2_log_unlock(sdp); 1118 1117 return 0; 1119 1118 }
+5 -3
fs/gfs2/glops.c
··· 47 47 bd_ail_gl_list); 48 48 bh = bd->bd_bh; 49 49 gfs2_remove_from_ail(bd); 50 - spin_unlock(&sdp->sd_ail_lock); 51 - 52 50 bd->bd_bh = NULL; 53 51 bh->b_private = NULL; 52 + spin_unlock(&sdp->sd_ail_lock); 53 + 54 54 bd->bd_blkno = bh->b_blocknr; 55 55 gfs2_log_lock(sdp); 56 56 gfs2_assert_withdraw(sdp, !buffer_busy(bh)); ··· 221 221 } 222 222 } 223 223 224 - if (ip == GFS2_I(gl->gl_sbd->sd_rindex)) 224 + if (ip == GFS2_I(gl->gl_sbd->sd_rindex)) { 225 + gfs2_log_flush(gl->gl_sbd, NULL); 225 226 gl->gl_sbd->sd_rindex_uptodate = 0; 227 + } 226 228 if (ip && S_ISREG(ip->i_inode.i_mode)) 227 229 truncate_inode_pages(ip->i_inode.i_mapping, 0); 228 230 }
+2
fs/gfs2/incore.h
··· 17 17 #include <linux/buffer_head.h> 18 18 #include <linux/rcupdate.h> 19 19 #include <linux/rculist_bl.h> 20 + #include <linux/completion.h> 20 21 21 22 #define DIO_WAIT 0x00000010 22 23 #define DIO_METADATA 0x00000020 ··· 547 546 struct gfs2_glock *sd_trans_gl; 548 547 wait_queue_head_t sd_glock_wait; 549 548 atomic_t sd_glock_disposal; 549 + struct completion sd_locking_init; 550 550 551 551 /* Inode Stuff */ 552 552
+1
fs/gfs2/log.c
··· 903 903 if (gfs2_ail1_empty(sdp)) 904 904 break; 905 905 } 906 + gfs2_log_flush(sdp, NULL); 906 907 } 907 908 908 909 static inline int gfs2_jrnl_flush_reqd(struct gfs2_sbd *sdp)
+3
fs/gfs2/ops_fstype.c
··· 72 72 73 73 init_waitqueue_head(&sdp->sd_glock_wait); 74 74 atomic_set(&sdp->sd_glock_disposal, 0); 75 + init_completion(&sdp->sd_locking_init); 75 76 spin_lock_init(&sdp->sd_statfs_spin); 76 77 77 78 spin_lock_init(&sdp->sd_rindex_spin); ··· 1018 1017 fsname++; 1019 1018 if (lm->lm_mount == NULL) { 1020 1019 fs_info(sdp, "Now mounting FS...\n"); 1020 + complete(&sdp->sd_locking_init); 1021 1021 return 0; 1022 1022 } 1023 1023 ret = lm->lm_mount(sdp, fsname); 1024 1024 if (ret == 0) 1025 1025 fs_info(sdp, "Joined cluster. Now mounting FS...\n"); 1026 + complete(&sdp->sd_locking_init); 1026 1027 return ret; 1027 1028 } 1028 1029
+30 -6
fs/gfs2/super.c
··· 757 757 struct timespec atime; 758 758 struct gfs2_dinode *di; 759 759 int ret = -EAGAIN; 760 + int unlock_required = 0; 760 761 761 762 /* Skip timestamp update, if this is from a memalloc */ 762 763 if (current->flags & PF_MEMALLOC) 763 764 goto do_flush; 764 - ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); 765 - if (ret) 766 - goto do_flush; 765 + if (!gfs2_glock_is_locked_by_me(ip->i_gl)) { 766 + ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); 767 + if (ret) 768 + goto do_flush; 769 + unlock_required = 1; 770 + } 767 771 ret = gfs2_trans_begin(sdp, RES_DINODE, 0); 768 772 if (ret) 769 773 goto do_unlock; ··· 784 780 } 785 781 gfs2_trans_end(sdp); 786 782 do_unlock: 787 - gfs2_glock_dq_uninit(&gh); 783 + if (unlock_required) 784 + gfs2_glock_dq_uninit(&gh); 788 785 do_flush: 789 786 if (wbc->sync_mode == WB_SYNC_ALL) 790 787 gfs2_log_flush(GFS2_SB(inode), ip->i_gl); ··· 1432 1427 return error; 1433 1428 } 1434 1429 1435 - /* 1430 + /** 1431 + * gfs2_evict_inode - Remove an inode from cache 1432 + * @inode: The inode to evict 1433 + * 1434 + * There are three cases to consider: 1435 + * 1. i_nlink == 0, we are final opener (and must deallocate) 1436 + * 2. i_nlink == 0, we are not the final opener (and cannot deallocate) 1437 + * 3. i_nlink > 0 1438 + * 1439 + * If the fs is read only, then we have to treat all cases as per #3 1440 + * since we are unable to do any deallocation. The inode will be 1441 + * deallocated by the next read/write node to attempt an allocation 1442 + * in the same resource group 1443 + * 1436 1444 * We have to (at the moment) hold the inodes main lock to cover 1437 1445 * the gap between unlocking the shared lock on the iopen lock and 1438 1446 * taking the exclusive lock. I'd rather do a shared -> exclusive ··· 1488 1470 if (error) 1489 1471 goto out_truncate; 1490 1472 1473 + /* Case 1 starts here */ 1474 + 1491 1475 if (S_ISDIR(inode->i_mode) && 1492 1476 (ip->i_diskflags & GFS2_DIF_EXHASH)) { 1493 1477 error = gfs2_dir_exhash_dealloc(ip); ··· 1513 1493 goto out_unlock; 1514 1494 1515 1495 out_truncate: 1496 + /* Case 2 starts here */ 1516 1497 error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); 1517 1498 if (error) 1518 1499 goto out_unlock; 1519 - gfs2_final_release_pages(ip); 1500 + /* Needs to be done before glock release & also in a transaction */ 1501 + truncate_inode_pages(&inode->i_data, 0); 1520 1502 gfs2_trans_end(sdp); 1521 1503 1522 1504 out_unlock: 1505 + /* Error path for case 1 */ 1523 1506 if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) 1524 1507 gfs2_glock_dq(&ip->i_iopen_gh); 1525 1508 gfs2_holder_uninit(&ip->i_iopen_gh); ··· 1530 1507 if (error && error != GLR_TRYFAILED && error != -EROFS) 1531 1508 fs_warn(sdp, "gfs2_evict_inode: %d\n", error); 1532 1509 out: 1510 + /* Case 3 starts here */ 1533 1511 truncate_inode_pages(&inode->i_data, 0); 1534 1512 end_writeback(inode); 1535 1513
+6 -1
fs/gfs2/sys.c
··· 338 338 rv = sscanf(buf, "%u", &first); 339 339 if (rv != 1 || first > 1) 340 340 return -EINVAL; 341 + rv = wait_for_completion_killable(&sdp->sd_locking_init); 342 + if (rv) 343 + return rv; 341 344 spin_lock(&sdp->sd_jindex_spin); 342 345 rv = -EBUSY; 343 346 if (test_bit(SDF_NOJOURNALID, &sdp->sd_flags) == 0) ··· 417 414 rv = sscanf(buf, "%d", &jid); 418 415 if (rv != 1) 419 416 return -EINVAL; 420 - 417 + rv = wait_for_completion_killable(&sdp->sd_locking_init); 418 + if (rv) 419 + return rv; 421 420 spin_lock(&sdp->sd_jindex_spin); 422 421 rv = -EINVAL; 423 422 if (sdp->sd_lockstruct.ls_ops->lm_mount == NULL)
+9 -22
fs/hppfs/hppfs.c
··· 139 139 static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry, 140 140 struct nameidata *nd) 141 141 { 142 - struct dentry *proc_dentry, *new, *parent; 142 + struct dentry *proc_dentry, *parent; 143 + struct qstr *name = &dentry->d_name; 143 144 struct inode *inode; 144 145 int err, deleted; 145 146 ··· 150 149 else if (deleted) 151 150 return ERR_PTR(-ENOENT); 152 151 153 - err = -ENOMEM; 154 152 parent = HPPFS_I(ino)->proc_dentry; 155 153 mutex_lock(&parent->d_inode->i_mutex); 156 - proc_dentry = d_lookup(parent, &dentry->d_name); 157 - if (proc_dentry == NULL) { 158 - proc_dentry = d_alloc(parent, &dentry->d_name); 159 - if (proc_dentry == NULL) { 160 - mutex_unlock(&parent->d_inode->i_mutex); 161 - goto out; 162 - } 163 - new = (*parent->d_inode->i_op->lookup)(parent->d_inode, 164 - proc_dentry, NULL); 165 - if (new) { 166 - dput(proc_dentry); 167 - proc_dentry = new; 168 - } 169 - } 154 + proc_dentry = lookup_one_len(name->name, parent, name->len); 170 155 mutex_unlock(&parent->d_inode->i_mutex); 171 156 172 157 if (IS_ERR(proc_dentry)) ··· 161 174 err = -ENOMEM; 162 175 inode = get_inode(ino->i_sb, proc_dentry); 163 176 if (!inode) 164 - goto out_dput; 177 + goto out; 165 178 166 179 d_add(dentry, inode); 167 180 return NULL; 168 181 169 - out_dput: 170 - dput(proc_dentry); 171 182 out: 172 183 return ERR_PTR(err); 173 184 } ··· 675 690 struct inode *proc_ino = dentry->d_inode; 676 691 struct inode *inode = new_inode(sb); 677 692 678 - if (!inode) 693 + if (!inode) { 694 + dput(dentry); 679 695 return ERR_PTR(-ENOMEM); 696 + } 680 697 681 698 if (S_ISDIR(dentry->d_inode->i_mode)) { 682 699 inode->i_op = &hppfs_dir_iops; ··· 691 704 inode->i_fop = &hppfs_file_fops; 692 705 } 693 706 694 - HPPFS_I(inode)->proc_dentry = dget(dentry); 707 + HPPFS_I(inode)->proc_dentry = dentry; 695 708 696 709 inode->i_uid = proc_ino->i_uid; 697 710 inode->i_gid = proc_ino->i_gid; ··· 724 737 sb->s_fs_info = proc_mnt; 725 738 726 739 err = -ENOMEM; 727 - root_inode = get_inode(sb, proc_mnt->mnt_sb->s_root); 740 + root_inode = get_inode(sb, dget(proc_mnt->mnt_sb->s_root)); 728 741 if (!root_inode) 729 742 goto out_mntput; 730 743
+1 -1
fs/libfs.c
··· 822 822 goto out; 823 823 824 824 attr->set_buf[size] = '\0'; 825 - val = simple_strtol(attr->set_buf, NULL, 0); 825 + val = simple_strtoll(attr->set_buf, NULL, 0); 826 826 ret = attr->set(attr->data, val); 827 827 if (ret == 0) 828 828 ret = len; /* on success, claim we got the whole input */
+8 -1
fs/namei.c
··· 433 433 goto err_parent; 434 434 BUG_ON(nd->inode != parent->d_inode); 435 435 } else { 436 + if (dentry->d_parent != parent) 437 + goto err_parent; 436 438 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); 437 439 if (!__d_rcu_to_refcount(dentry, nd->seq)) 438 440 goto err_child; ··· 942 940 * Don't forget we might have a non-mountpoint managed dentry 943 941 * that wants to block transit. 944 942 */ 945 - *inode = path->dentry->d_inode; 946 943 if (unlikely(managed_dentry_might_block(path->dentry))) 947 944 return false; 948 945 ··· 954 953 path->mnt = mounted; 955 954 path->dentry = mounted->mnt_root; 956 955 nd->seq = read_seqcount_begin(&path->dentry->d_seq); 956 + /* 957 + * Update the inode too. We don't need to re-check the 958 + * dentry sequence number here after this d_inode read, 959 + * because a mount-point is always pinned. 960 + */ 961 + *inode = path->dentry->d_inode; 957 962 } 958 963 return true; 959 964 }
+4 -8
fs/ufs/namei.c
··· 56 56 57 57 lock_ufs(dir->i_sb); 58 58 ino = ufs_inode_by_name(dir, &dentry->d_name); 59 - if (ino) { 59 + if (ino) 60 60 inode = ufs_iget(dir->i_sb, ino); 61 - if (IS_ERR(inode)) { 62 - unlock_ufs(dir->i_sb); 63 - return ERR_CAST(inode); 64 - } 65 - } 66 61 unlock_ufs(dir->i_sb); 67 - d_add(dentry, inode); 68 - return NULL; 62 + if (IS_ERR(inode)) 63 + return ERR_CAST(inode); 64 + return d_splice_alias(inode, dentry); 69 65 } 70 66 71 67 /*
+1 -1
include/acpi/acpi_bus.h
··· 210 210 struct acpi_device_power { 211 211 int state; /* Current state */ 212 212 struct acpi_device_power_flags flags; 213 - struct acpi_device_power_state states[4]; /* Power states (D0-D3) */ 213 + struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */ 214 214 }; 215 215 216 216 /* Performance Management */
+3
include/acpi/acpiosxf.h
··· 98 98 /* 99 99 * Spinlock primitives 100 100 */ 101 + 102 + #ifndef acpi_os_create_lock 101 103 acpi_status 102 104 acpi_os_create_lock(acpi_spinlock *out_handle); 105 + #endif 103 106 104 107 void acpi_os_delete_lock(acpi_spinlock handle); 105 108
+18
include/acpi/platform/aclinux.h
··· 159 159 } while (0) 160 160 #endif 161 161 162 + /* 163 + * When lockdep is enabled, the spin_lock_init() macro stringifies it's 164 + * argument and uses that as a name for the lock in debugging. 165 + * By executing spin_lock_init() in a macro the key changes from "lock" for 166 + * all locks to the name of the argument of acpi_os_create_lock(), which 167 + * prevents lockdep from reporting false positives for ACPICA locks. 168 + */ 169 + #define acpi_os_create_lock(__handle) \ 170 + ({ \ 171 + spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \ 172 + \ 173 + if (lock) { \ 174 + *(__handle) = lock; \ 175 + spin_lock_init(*(__handle)); \ 176 + } \ 177 + lock ? AE_OK : AE_NO_MEMORY; \ 178 + }) 179 + 162 180 #endif /* __KERNEL__ */ 163 181 164 182 #endif /* __ACLINUX_H__ */
+2
include/drm/drm_pciids.h
··· 182 182 {0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 183 183 {0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 184 184 {0x1002, 0x6759, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 185 + {0x1002, 0x675F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 185 186 {0x1002, 0x6760, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 186 187 {0x1002, 0x6761, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 187 188 {0x1002, 0x6762, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ ··· 193 192 {0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 194 193 {0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 195 194 {0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 195 + {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 196 196 {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 197 197 {0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 198 198 {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
-6
include/linux/netdevice.h
··· 1070 1070 #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \ 1071 1071 NETIF_F_FSO) 1072 1072 1073 - #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ 1074 - NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ 1075 - NETIF_F_HIGHDMA | \ 1076 - NETIF_F_SCTP_CSUM | \ 1077 - NETIF_F_ALL_FCOE) 1078 - 1079 1073 /* 1080 1074 * If one device supports one of these features, then enable them 1081 1075 * for all in netdev_increment_features.
+1 -5
include/linux/sdla.h
··· 112 112 short Tb_max; 113 113 }; 114 114 115 - #ifndef __KERNEL__ 116 - 117 - void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet); 118 - 119 - #else 115 + #ifdef __KERNEL__ 120 116 121 117 /* important Z80 window addresses */ 122 118 #define SDLA_CONTROL_WND 0xE000
+25 -1
kernel/rcutree.c
··· 84 84 85 85 static struct rcu_state *rcu_state; 86 86 87 + /* 88 + * The rcu_scheduler_active variable transitions from zero to one just 89 + * before the first task is spawned. So when this variable is zero, RCU 90 + * can assume that there is but one task, allowing RCU to (for example) 91 + * optimized synchronize_sched() to a simple barrier(). When this variable 92 + * is one, RCU must actually do all the hard work required to detect real 93 + * grace periods. This variable is also used to suppress boot-time false 94 + * positives from lockdep-RCU error checking. 95 + */ 87 96 int rcu_scheduler_active __read_mostly; 88 97 EXPORT_SYMBOL_GPL(rcu_scheduler_active); 98 + 99 + /* 100 + * The rcu_scheduler_fully_active variable transitions from zero to one 101 + * during the early_initcall() processing, which is after the scheduler 102 + * is capable of creating new tasks. So RCU processing (for example, 103 + * creating tasks for RCU priority boosting) must be delayed until after 104 + * rcu_scheduler_fully_active transitions from zero to one. We also 105 + * currently delay invocation of any RCU callbacks until after this point. 106 + * 107 + * It might later prove better for people registering RCU callbacks during 108 + * early boot to take responsibility for these callbacks, but one step at 109 + * a time. 110 + */ 111 + static int rcu_scheduler_fully_active __read_mostly; 89 112 90 113 #ifdef CONFIG_RCU_BOOST 91 114 ··· 121 98 DEFINE_PER_CPU(int, rcu_cpu_kthread_cpu); 122 99 DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops); 123 100 DEFINE_PER_CPU(char, rcu_cpu_has_work); 124 - static char rcu_kthreads_spawnable; 125 101 126 102 #endif /* #ifdef CONFIG_RCU_BOOST */ 127 103 ··· 1489 1467 */ 1490 1468 static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp) 1491 1469 { 1470 + if (unlikely(!ACCESS_ONCE(rcu_scheduler_fully_active))) 1471 + return; 1492 1472 if (likely(!rsp->boost)) { 1493 1473 rcu_do_batch(rsp, rdp); 1494 1474 return;
+11 -4
kernel/rcutree_plugin.h
··· 1532 1532 struct sched_param sp; 1533 1533 struct task_struct *t; 1534 1534 1535 - if (!rcu_kthreads_spawnable || 1535 + if (!rcu_scheduler_fully_active || 1536 1536 per_cpu(rcu_cpu_kthread_task, cpu) != NULL) 1537 1537 return 0; 1538 1538 t = kthread_create(rcu_cpu_kthread, (void *)(long)cpu, "rcuc%d", cpu); ··· 1639 1639 struct sched_param sp; 1640 1640 struct task_struct *t; 1641 1641 1642 - if (!rcu_kthreads_spawnable || 1642 + if (!rcu_scheduler_fully_active || 1643 1643 rnp->qsmaskinit == 0) 1644 1644 return 0; 1645 1645 if (rnp->node_kthread_task == NULL) { ··· 1665 1665 int cpu; 1666 1666 struct rcu_node *rnp; 1667 1667 1668 - rcu_kthreads_spawnable = 1; 1668 + rcu_scheduler_fully_active = 1; 1669 1669 for_each_possible_cpu(cpu) { 1670 1670 per_cpu(rcu_cpu_has_work, cpu) = 0; 1671 1671 if (cpu_online(cpu)) ··· 1687 1687 struct rcu_node *rnp = rdp->mynode; 1688 1688 1689 1689 /* Fire up the incoming CPU's kthread and leaf rcu_node kthread. */ 1690 - if (rcu_kthreads_spawnable) { 1690 + if (rcu_scheduler_fully_active) { 1691 1691 (void)rcu_spawn_one_cpu_kthread(cpu); 1692 1692 if (rnp->node_kthread_task == NULL) 1693 1693 (void)rcu_spawn_one_node_kthread(rcu_state, rnp); ··· 1725 1725 static void rcu_cpu_kthread_setrt(int cpu, int to_rt) 1726 1726 { 1727 1727 } 1728 + 1729 + static int __init rcu_scheduler_really_started(void) 1730 + { 1731 + rcu_scheduler_fully_active = 1; 1732 + return 0; 1733 + } 1734 + early_initcall(rcu_scheduler_really_started); 1728 1735 1729 1736 static void __cpuinit rcu_prepare_kthreads(int cpu) 1730 1737 {
+3
kernel/sched.c
··· 7757 7757 #endif 7758 7758 #endif 7759 7759 cfs_rq->min_vruntime = (u64)(-(1LL << 20)); 7760 + #ifndef CONFIG_64BIT 7761 + cfs_rq->min_vruntime_copy = cfs_rq->min_vruntime; 7762 + #endif 7760 7763 } 7761 7764 7762 7765 static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq)
+2 -1
mm/vmscan.c
··· 2310 2310 for (i = 0; i <= classzone_idx; i++) 2311 2311 present_pages += pgdat->node_zones[i].present_pages; 2312 2312 2313 - return balanced_pages > (present_pages >> 2); 2313 + /* A special case here: if zone has no page, we think it's balanced */ 2314 + return balanced_pages >= (present_pages >> 2); 2314 2315 } 2315 2316 2316 2317 /* is kswapd sleeping prematurely? */
+5 -1
net/8021q/vlan_dev.c
··· 530 530 (1<<__LINK_STATE_DORMANT))) | 531 531 (1<<__LINK_STATE_PRESENT); 532 532 533 - dev->hw_features = NETIF_F_ALL_TX_OFFLOADS; 533 + dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | 534 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | 535 + NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | 536 + NETIF_F_ALL_FCOE; 537 + 534 538 dev->features |= real_dev->vlan_features | NETIF_F_LLTX; 535 539 dev->gso_max_size = real_dev->gso_max_size; 536 540
+5 -4
net/bluetooth/l2cap_core.c
··· 763 763 struct sock *parent = bt_sk(sk)->parent; 764 764 rsp.result = cpu_to_le16(L2CAP_CR_PEND); 765 765 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND); 766 - parent->sk_data_ready(parent, 0); 766 + if (parent) 767 + parent->sk_data_ready(parent, 0); 767 768 768 769 } else { 769 770 l2cap_state_change(chan, BT_CONFIG); ··· 2524 2523 2525 2524 sk = chan->sk; 2526 2525 2527 - if ((bt_sk(sk)->defer_setup && chan->state != BT_CONNECT2) || 2528 - (!bt_sk(sk)->defer_setup && chan->state != BT_CONFIG)) { 2526 + if (chan->state != BT_CONFIG && chan->state != BT_CONNECT2) { 2529 2527 struct l2cap_cmd_rej_cid rej; 2530 2528 2531 2529 rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID); ··· 4150 4150 struct sock *parent = bt_sk(sk)->parent; 4151 4151 res = L2CAP_CR_PEND; 4152 4152 stat = L2CAP_CS_AUTHOR_PEND; 4153 - parent->sk_data_ready(parent, 0); 4153 + if (parent) 4154 + parent->sk_data_ready(parent, 0); 4154 4155 } else { 4155 4156 l2cap_state_change(chan, BT_CONFIG); 4156 4157 res = L2CAP_CR_SUCCESS;
+10 -7
net/ceph/ceph_fs.c
··· 36 36 if ((flags & O_DIRECTORY) == O_DIRECTORY) 37 37 return CEPH_FILE_MODE_PIN; 38 38 #endif 39 - if ((flags & O_APPEND) == O_APPEND) 40 - flags |= O_WRONLY; 41 39 42 - if ((flags & O_ACCMODE) == O_RDWR) 43 - mode = CEPH_FILE_MODE_RDWR; 44 - else if ((flags & O_ACCMODE) == O_WRONLY) 40 + switch (flags & O_ACCMODE) { 41 + case O_WRONLY: 45 42 mode = CEPH_FILE_MODE_WR; 46 - else 43 + break; 44 + case O_RDONLY: 47 45 mode = CEPH_FILE_MODE_RD; 48 - 46 + break; 47 + case O_RDWR: 48 + case O_ACCMODE: /* this is what the VFS does */ 49 + mode = CEPH_FILE_MODE_RDWR; 50 + break; 51 + } 49 52 #ifdef O_LAZY 50 53 if (flags & O_LAZY) 51 54 mode |= CEPH_FILE_MODE_LAZY;
+8 -11
net/sctp/output.c
··· 500 500 * Note: Adler-32 is no longer applicable, as has been replaced 501 501 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. 502 502 */ 503 - if (!sctp_checksum_disable && 504 - !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) { 505 - __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 503 + if (!sctp_checksum_disable) { 504 + if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) { 505 + __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 506 506 507 - /* 3) Put the resultant value into the checksum field in the 508 - * common header, and leave the rest of the bits unchanged. 509 - */ 510 - sh->checksum = sctp_end_cksum(crc32); 511 - } else { 512 - if (dst->dev->features & NETIF_F_SCTP_CSUM) { 507 + /* 3) Put the resultant value into the checksum field in the 508 + * common header, and leave the rest of the bits unchanged. 509 + */ 510 + sh->checksum = sctp_end_cksum(crc32); 511 + } else { 513 512 /* no need to seed pseudo checksum for SCTP */ 514 513 nskb->ip_summed = CHECKSUM_PARTIAL; 515 514 nskb->csum_start = (skb_transport_header(nskb) - 516 515 nskb->head); 517 516 nskb->csum_offset = offsetof(struct sctphdr, checksum); 518 - } else { 519 - nskb->ip_summed = CHECKSUM_UNNECESSARY; 520 517 } 521 518 } 522 519
+5 -4
sound/soc/codecs/wm8994.c
··· 1190 1190 SND_SOC_DAPM_INPUT("DMIC2DAT"), 1191 1191 SND_SOC_DAPM_INPUT("Clock"), 1192 1192 1193 - SND_SOC_DAPM_MICBIAS("MICBIAS", WM8994_MICBIAS, 2, 0), 1194 1193 SND_SOC_DAPM_SUPPLY_S("MICBIAS Supply", 1, SND_SOC_NOPM, 0, 0, micbias_ev, 1195 1194 SND_SOC_DAPM_PRE_PMU), 1196 1195 ··· 1508 1509 { "AIF2DACDAT", NULL, "AIF1DACDAT" }, 1509 1510 { "AIF1ADCDAT", NULL, "AIF2ADCDAT" }, 1510 1511 { "AIF2ADCDAT", NULL, "AIF1ADCDAT" }, 1511 - { "MICBIAS", NULL, "CLK_SYS" }, 1512 - { "MICBIAS", NULL, "MICBIAS Supply" }, 1512 + { "MICBIAS1", NULL, "CLK_SYS" }, 1513 + { "MICBIAS1", NULL, "MICBIAS Supply" }, 1514 + { "MICBIAS2", NULL, "CLK_SYS" }, 1515 + { "MICBIAS2", NULL, "MICBIAS Supply" }, 1513 1516 }; 1514 1517 1515 1518 static const struct snd_soc_dapm_route wm8994_intercon[] = { ··· 2764 2763 report = SND_JACK_MICROPHONE; 2765 2764 2766 2765 /* Everything else is buttons; just assign slots */ 2767 - if (status & 0x1c0) 2766 + if (status & 0x1c) 2768 2767 report |= SND_JACK_BTN_0; 2769 2768 2770 2769 done:
+8 -8
sound/soc/sh/fsi-ak4642.c
··· 97 97 98 98 static struct fsi_ak4642_data fsi_a_ak4642 = { 99 99 .name = "AK4642", 100 - .card = "FSIA (AK4642)", 100 + .card = "FSIA-AK4642", 101 101 .cpu_dai = "fsia-dai", 102 102 .codec = "ak4642-codec.0-0012", 103 103 .platform = "sh_fsi.0", ··· 106 106 107 107 static struct fsi_ak4642_data fsi_b_ak4642 = { 108 108 .name = "AK4642", 109 - .card = "FSIB (AK4642)", 109 + .card = "FSIB-AK4642", 110 110 .cpu_dai = "fsib-dai", 111 111 .codec = "ak4642-codec.0-0012", 112 112 .platform = "sh_fsi.0", ··· 115 115 116 116 static struct fsi_ak4642_data fsi_a_ak4643 = { 117 117 .name = "AK4643", 118 - .card = "FSIA (AK4643)", 118 + .card = "FSIA-AK4643", 119 119 .cpu_dai = "fsia-dai", 120 120 .codec = "ak4642-codec.0-0013", 121 121 .platform = "sh_fsi.0", ··· 124 124 125 125 static struct fsi_ak4642_data fsi_b_ak4643 = { 126 126 .name = "AK4643", 127 - .card = "FSIB (AK4643)", 127 + .card = "FSIB-AK4643", 128 128 .cpu_dai = "fsib-dai", 129 129 .codec = "ak4642-codec.0-0013", 130 130 .platform = "sh_fsi.0", ··· 133 133 134 134 static struct fsi_ak4642_data fsi2_a_ak4642 = { 135 135 .name = "AK4642", 136 - .card = "FSI2A (AK4642)", 136 + .card = "FSI2A-AK4642", 137 137 .cpu_dai = "fsia-dai", 138 138 .codec = "ak4642-codec.0-0012", 139 139 .platform = "sh_fsi2", ··· 142 142 143 143 static struct fsi_ak4642_data fsi2_b_ak4642 = { 144 144 .name = "AK4642", 145 - .card = "FSI2B (AK4642)", 145 + .card = "FSI2B-AK4642", 146 146 .cpu_dai = "fsib-dai", 147 147 .codec = "ak4642-codec.0-0012", 148 148 .platform = "sh_fsi2", ··· 151 151 152 152 static struct fsi_ak4642_data fsi2_a_ak4643 = { 153 153 .name = "AK4643", 154 - .card = "FSI2A (AK4643)", 154 + .card = "FSI2A-AK4643", 155 155 .cpu_dai = "fsia-dai", 156 156 .codec = "ak4642-codec.0-0013", 157 157 .platform = "sh_fsi2", ··· 160 160 161 161 static struct fsi_ak4642_data fsi2_b_ak4643 = { 162 162 .name = "AK4643", 163 - .card = "FSI2B (AK4643)", 163 + .card = "FSI2B-AK4643", 164 164 .cpu_dai = "fsib-dai", 165 165 .codec = "ak4642-codec.0-0013", 166 166 .platform = "sh_fsi2",
+1 -1
sound/soc/sh/fsi-da7210.c
··· 42 42 }; 43 43 44 44 static struct snd_soc_card fsi_soc_card = { 45 - .name = "FSI (DA7210)", 45 + .name = "FSI-DA7210", 46 46 .dai_link = &fsi_da7210_dai, 47 47 .num_links = 1, 48 48 };
+2 -2
sound/soc/sh/fsi-hdmi.c
··· 83 83 84 84 static struct fsi_hdmi_data fsi2_a_hdmi = { 85 85 .cpu_dai = "fsia-dai", 86 - .card = "FSI2A (SH MOBILE HDMI)", 86 + .card = "FSI2A-HDMI", 87 87 .id = FSI_PORT_A, 88 88 }; 89 89 90 90 static struct fsi_hdmi_data fsi2_b_hdmi = { 91 91 .cpu_dai = "fsib-dai", 92 - .card = "FSI2B (SH MOBILE HDMI)", 92 + .card = "FSI2B-HDMI", 93 93 .id = FSI_PORT_B, 94 94 }; 95 95