diff --git a/[refs] b/[refs] index ab4ebc21238c..5e817c81055c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1e65174a3378494608e8ed7f8c74d658be9a0fb2 +refs/heads/master: c1542cbc50d19565006633827532ab9f96c92cea diff --git a/trunk/.gitignore b/trunk/.gitignore deleted file mode 100644 index 5014bfa48ac1..000000000000 --- a/trunk/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# -# NOTE! Don't add files that are generated in specific -# subdirectories here. Add them in the ".gitignore" file -# in that subdirectory instead. -# -# Normal rules -# -.* -*.o -*.a -*.s -*.ko -*.mod.c - -# -# Top-level generic files -# -vmlinux* -System.map -Module.symvers - -# -# Generated include files -# -include/asm -include/config -include/linux/autoconf.h -include/linux/compile.h -include/linux/version.h - diff --git a/trunk/Makefile b/trunk/Makefile index be33d758c0fe..504ba3ceb296 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -660,10 +660,8 @@ quiet_cmd_sysmap = SYSMAP # Link of vmlinux # If CONFIG_KALLSYMS is set .version is already updated # Generate System.map and verify that the content is consistent -# Use + in front of the vmlinux_version rule to silent warning with make -j2 -# First command is ':' to allow us to use + in front of the rule + define rule_vmlinux__ - : $(if $(CONFIG_KALLSYMS),,+$(call cmd,vmlinux_version)) $(call cmd,vmlinux__) diff --git a/trunk/drivers/acpi/event.c b/trunk/drivers/acpi/event.c index 2dbb1b0f11d5..bfa8b76de403 100644 --- a/trunk/drivers/acpi/event.c +++ b/trunk/drivers/acpi/event.c @@ -58,8 +58,9 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count, return_VALUE(-EAGAIN); result = acpi_bus_receive_event(&event); - if (result) - return_VALUE(result); + if (result) { + return_VALUE(-EIO); + } chars_remaining = sprintf(str, "%s %s %08x %08x\n", event.device_class ? event. diff --git a/trunk/drivers/char/.gitignore b/trunk/drivers/char/.gitignore deleted file mode 100644 index 2b6b1d772ed7..000000000000 --- a/trunk/drivers/char/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -consolemap_deftbl.c -defkeymap.c - diff --git a/trunk/drivers/char/n_r3964.c b/trunk/drivers/char/n_r3964.c index 853c98cee64f..97d6dc24b800 100644 --- a/trunk/drivers/char/n_r3964.c +++ b/trunk/drivers/char/n_r3964.c @@ -695,7 +695,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c) { TRACE_PE("IDLE - got STX but no space in rx_queue!"); pInfo->state=R3964_WAIT_FOR_RX_BUF; - mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF); + mod_timer(&pInfo->tmr, R3964_TO_NO_BUF); break; } start_receiving: @@ -705,7 +705,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c) pInfo->last_rx = 0; pInfo->flags &= ~R3964_ERROR; pInfo->state=R3964_RECEIVING; - mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); + mod_timer(&pInfo->tmr, R3964_TO_ZVZ); pInfo->nRetry = 0; put_char(pInfo, DLE); flush(pInfo); @@ -732,7 +732,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c) if(pInfo->flags & R3964_BCC) { pInfo->state = R3964_WAIT_FOR_BCC; - mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); + mod_timer(&pInfo->tmr, R3964_TO_ZVZ); } else { @@ -744,7 +744,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c) pInfo->last_rx = c; char_to_buf: pInfo->rx_buf[pInfo->rx_position++] = c; - mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); + mod_timer(&pInfo->tmr, R3964_TO_ZVZ); } } /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ diff --git a/trunk/drivers/input/misc/uinput.c b/trunk/drivers/input/misc/uinput.c index 4015a91f4b6e..d5c5b32045af 100644 --- a/trunk/drivers/input/misc/uinput.c +++ b/trunk/drivers/input/misc/uinput.c @@ -90,11 +90,11 @@ static inline int uinput_request_reserve_slot(struct uinput_device *udev, struct static void uinput_request_done(struct uinput_device *udev, struct uinput_request *request) { + complete(&request->done); + /* Mark slot as available */ udev->requests[request->id] = NULL; wake_up_interruptible(&udev->requests_waitq); - - complete(&request->done); } static int uinput_request_submit(struct input_dev *dev, struct uinput_request *request) diff --git a/trunk/drivers/media/video/vpx3220.c b/trunk/drivers/media/video/vpx3220.c index 137b58f2c666..4437bdebe24f 100644 --- a/trunk/drivers/media/video/vpx3220.c +++ b/trunk/drivers/media/video/vpx3220.c @@ -203,7 +203,7 @@ static const unsigned short init_ntsc[] = { 0x8c, 640, /* Horizontal length */ 0x8d, 640, /* Number of pixels */ 0x8f, 0xc00, /* Disable window 2 */ - 0xf0, 0x73, /* 13.5 MHz transport, Forced + 0xf0, 0x173, /* 13.5 MHz transport, Forced * mode, latch windows */ 0xf2, 0x13, /* NTSC M, composite input */ 0xe7, 0x1e1, /* Enable vertical standard @@ -212,36 +212,38 @@ static const unsigned short init_ntsc[] = { static const unsigned short init_pal[] = { 0x88, 23, /* Window 1 vertical begin */ - 0x89, 288, /* Vertical lines in (16 lines + 0x89, 288 + 16, /* Vertical lines in (16 lines * skipped by the VFE) */ - 0x8a, 288, /* Vertical lines out (16 lines + 0x8a, 288 + 16, /* Vertical lines out (16 lines * skipped by the VFE) */ 0x8b, 16, /* Horizontal begin */ 0x8c, 768, /* Horizontal length */ 0x8d, 784, /* Number of pixels * Must be >= Horizontal begin + Horizontal length */ 0x8f, 0xc00, /* Disable window 2 */ - 0xf0, 0x77, /* 13.5 MHz transport, Forced + 0xf0, 0x177, /* 13.5 MHz transport, Forced * mode, latch windows */ 0xf2, 0x3d1, /* PAL B,G,H,I, composite input */ - 0xe7, 0x241, /* PAL/SECAM set to 288 lines */ + 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines + * change to 0x241 for 288 lines */ }; static const unsigned short init_secam[] = { - 0x88, 23, /* Window 1 vertical begin */ - 0x89, 288, /* Vertical lines in (16 lines + 0x88, 23 - 16, /* Window 1 vertical begin */ + 0x89, 288 + 16, /* Vertical lines in (16 lines * skipped by the VFE) */ - 0x8a, 288, /* Vertical lines out (16 lines + 0x8a, 288 + 16, /* Vertical lines out (16 lines * skipped by the VFE) */ 0x8b, 16, /* Horizontal begin */ 0x8c, 768, /* Horizontal length */ 0x8d, 784, /* Number of pixels * Must be >= Horizontal begin + Horizontal length */ 0x8f, 0xc00, /* Disable window 2 */ - 0xf0, 0x77, /* 13.5 MHz transport, Forced + 0xf0, 0x177, /* 13.5 MHz transport, Forced * mode, latch windows */ 0xf2, 0x3d5, /* SECAM, composite input */ - 0xe7, 0x241, /* PAL/SECAM set to 288 lines */ + 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines + * change to 0x241 for 288 lines */ }; static const unsigned char init_common[] = { @@ -408,12 +410,6 @@ vpx3220_command (struct i2c_client *client, case DECODER_SET_NORM: { int *iarg = arg, data; - int temp_input; - - /* Here we back up the input selection because it gets - overwritten when we fill the registers with the - choosen video norm */ - temp_input = vpx3220_fp_read(client, 0xf2); dprintk(1, KERN_DEBUG "%s: DECODER_SET_NORM %d\n", I2C_NAME(client), *iarg); @@ -453,10 +449,6 @@ vpx3220_command (struct i2c_client *client, } decoder->norm = *iarg; - - /* And here we set the backed up video input again */ - vpx3220_fp_write(client, 0xf2, temp_input | 0x0010); - udelay(10); } break; diff --git a/trunk/drivers/pci/.gitignore b/trunk/drivers/pci/.gitignore deleted file mode 100644 index f297ca8d313e..000000000000 --- a/trunk/drivers/pci/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -classlist.h -devlist.h -gen-devlist - diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index a6a630a950d0..11ca44387cb0 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -1233,7 +1233,7 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev) DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic ); #endif -#ifdef CONFIG_SCSI_SATA_INTEL_COMBINED +#ifdef CONFIG_SCSI_SATA static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) { u8 prog, comb, tmp; @@ -1310,7 +1310,7 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) request_region(0x170, 8, "libata"); /* port 1 */ } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined ); -#endif /* CONFIG_SCSI_SATA_INTEL_COMBINED */ +#endif /* CONFIG_SCSI_SATA */ int pcie_mch_quirk; diff --git a/trunk/drivers/scsi/Kconfig b/trunk/drivers/scsi/Kconfig index 3ee9b8b33be0..20019b82b4a8 100644 --- a/trunk/drivers/scsi/Kconfig +++ b/trunk/drivers/scsi/Kconfig @@ -553,11 +553,6 @@ config SCSI_SATA_VITESSE If unsure, say N. -config SCSI_SATA_INTEL_COMBINED - bool - depends on IDE=y && !BLK_DEV_IDE_SATA && (SCSI_SATA_AHCI || SCSI_ATA_PIIX) - default y - config SCSI_BUSLOGIC tristate "BusLogic SCSI support" depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API diff --git a/trunk/drivers/serial/8250_pnp.c b/trunk/drivers/serial/8250_pnp.c index c2786fc41cc5..5d8660a42b77 100644 --- a/trunk/drivers/serial/8250_pnp.c +++ b/trunk/drivers/serial/8250_pnp.c @@ -276,6 +276,8 @@ static const struct pnp_device_id pnp_dev_table[] = { { "SUP1620", 0 }, /* SupraExpress 33.6 Data/Fax PnP modem */ { "SUP1760", 0 }, + /* SupraExpress 56i Sp Intl */ + { "SUP2171", 0 }, /* Phoebe Micro */ /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ { "TEX0011", 0 }, diff --git a/trunk/drivers/usb/host/isp116x-hcd.c b/trunk/drivers/usb/host/isp116x-hcd.c index e142056b0d2c..41bbae83fc71 100644 --- a/trunk/drivers/usb/host/isp116x-hcd.c +++ b/trunk/drivers/usb/host/isp116x-hcd.c @@ -326,8 +326,7 @@ static void postproc_atl_queue(struct isp116x *isp116x) usb_settoggle(udev, ep->epnum, ep->nextpid == USB_PID_OUT, - PTD_GET_TOGGLE(ptd)); - urb->actual_length += PTD_GET_COUNT(ptd); + PTD_GET_TOGGLE(ptd) ^ 1); urb->status = cc_to_error[TD_DATAUNDERRUN]; spin_unlock(&urb->lock); continue; diff --git a/trunk/drivers/usb/input/hid-core.c b/trunk/drivers/usb/input/hid-core.c index 41f92b924761..a99865c689c5 100644 --- a/trunk/drivers/usb/input/hid-core.c +++ b/trunk/drivers/usb/input/hid-core.c @@ -1702,7 +1702,10 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */ continue; + /* handle potential highspeed HID correctly */ interval = endpoint->bInterval; + if (dev->speed == USB_SPEED_HIGH) + interval = 1 << (interval - 1); /* Change the polling interval of mice. */ if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0) diff --git a/trunk/drivers/video/console/vgacon.c b/trunk/drivers/video/console/vgacon.c index 809fee2140ac..6ef6f7760e47 100644 --- a/trunk/drivers/video/console/vgacon.c +++ b/trunk/drivers/video/console/vgacon.c @@ -565,11 +565,7 @@ static int vgacon_switch(struct vc_data *c) scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, c->vc_screenbuf_size > vga_vram_size ? vga_vram_size : c->vc_screenbuf_size); - if (!(vga_video_num_columns % 2) && - vga_video_num_columns <= ORIG_VIDEO_COLS && - vga_video_num_lines <= (ORIG_VIDEO_LINES * - vga_default_font_height) / c->vc_font.height) - vgacon_doresize(c, c->vc_cols, c->vc_rows); + vgacon_doresize(c, c->vc_cols, c->vc_rows); } return 0; /* Redrawing not needed */ @@ -1027,8 +1023,7 @@ static int vgacon_resize(struct vc_data *c, unsigned int width, if (width % 2 || width > ORIG_VIDEO_COLS || height > (ORIG_VIDEO_LINES * vga_default_font_height)/ c->vc_font.height) - /* let svgatextmode tinker with video timings */ - return 0; + return -EINVAL; if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ vgacon_doresize(c, width, height); diff --git a/trunk/drivers/video/logo/.gitignore b/trunk/drivers/video/logo/.gitignore deleted file mode 100644 index e48355f538fa..000000000000 --- a/trunk/drivers/video/logo/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# -# Generated files -# -*_mono.c -*_vga16.c -*_clut224.c -*_gray256.c diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 9fe7216457d8..d6b1551342b7 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -398,7 +398,7 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx) if (unlikely(!req)) return NULL; - req->ki_flags = 0; + req->ki_flags = 1 << KIF_LOCKED; req->ki_users = 2; req->ki_key = 0; req->ki_ctx = ctx; @@ -547,6 +547,25 @@ struct kioctx *lookup_ioctx(unsigned long ctx_id) return ioctx; } +static int lock_kiocb_action(void *param) +{ + schedule(); + return 0; +} + +static inline void lock_kiocb(struct kiocb *iocb) +{ + wait_on_bit_lock(&iocb->ki_flags, KIF_LOCKED, lock_kiocb_action, + TASK_UNINTERRUPTIBLE); +} + +static inline void unlock_kiocb(struct kiocb *iocb) +{ + kiocbClearLocked(iocb); + smp_mb__after_clear_bit(); + wake_up_bit(&iocb->ki_flags, KIF_LOCKED); +} + /* * use_mm * Makes the calling kernel thread take on the specified @@ -777,7 +796,9 @@ static int __aio_run_iocbs(struct kioctx *ctx) * Hold an extra reference while retrying i/o. */ iocb->ki_users++; /* grab extra reference */ + lock_kiocb(iocb); aio_run_iocb(iocb); + unlock_kiocb(iocb); if (__aio_put_req(ctx, iocb)) /* drop extra ref */ put_ioctx(ctx); } @@ -1521,6 +1542,7 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, spin_lock_irq(&ctx->ctx_lock); aio_run_iocb(req); + unlock_kiocb(req); if (!list_empty(&ctx->run_list)) { /* drain the run list */ while (__aio_run_iocbs(ctx)) @@ -1652,6 +1674,7 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, if (NULL != cancel) { struct io_event tmp; pr_debug("calling cancel\n"); + lock_kiocb(kiocb); memset(&tmp, 0, sizeof(tmp)); tmp.obj = (u64)(unsigned long)kiocb->ki_obj.user; tmp.data = kiocb->ki_user_data; @@ -1663,6 +1686,7 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, if (copy_to_user(result, &tmp, sizeof(tmp))) ret = -EFAULT; } + unlock_kiocb(kiocb); } else ret = -EINVAL; diff --git a/trunk/fs/nfs/delegation.c b/trunk/fs/nfs/delegation.c index 4a36839f0bbd..d7f7eb669d03 100644 --- a/trunk/fs/nfs/delegation.c +++ b/trunk/fs/nfs/delegation.c @@ -85,10 +85,6 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct struct nfs_delegation *delegation; int status = 0; - /* Ensure we first revalidate the attributes and page cache! */ - if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) - __nfs_revalidate_inode(NFS_SERVER(inode), inode); - delegation = nfs_alloc_delegation(); if (delegation == NULL) return -ENOMEM; diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 6bdcfa95de94..f6b9eda925c5 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -137,8 +137,7 @@ static int nfs_revalidate_file(struct inode *inode, struct file *filp) struct nfs_inode *nfsi = NFS_I(inode); int retval = 0; - if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR)) - || nfs_attribute_timeout(inode)) + if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) || nfs_attribute_timeout(inode)) retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode); nfs_revalidate_mapping(inode, filp->f_mapping); return 0; diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index d4eadeea128e..6922469d6fc5 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -877,10 +877,12 @@ static int nfs_wait_on_inode(struct inode *inode) sigset_t oldmask; int error; + atomic_inc(&inode->i_count); rpc_clnt_sigmask(clnt, &oldmask); error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, nfs_wait_schedule, TASK_INTERRUPTIBLE); rpc_clnt_sigunmask(clnt, &oldmask); + iput(inode); return error; } @@ -1224,6 +1226,10 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) loff_t cur_size, new_isize; int data_unstable; + /* Do we hold a delegation? */ + if (nfs_have_delegation(inode, FMODE_READ)) + return 0; + spin_lock(&inode->i_lock); /* Are we in the process of updating data on the server? */ @@ -1344,8 +1350,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign nfsi->read_cache_jiffies = fattr->timestamp; /* Are we racing with known updates of the metadata on the server? */ - data_unstable = ! (nfs_verify_change_attribute(inode, verifier) || - (nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)); + data_unstable = ! nfs_verify_change_attribute(inode, verifier); /* Check if our cached file size is stale */ new_isize = nfs_size_to_loff_t(fattr->size); diff --git a/trunk/fs/proc/nommu.c b/trunk/fs/proc/nommu.c index cff10ab1af63..f3bf016d5ee3 100644 --- a/trunk/fs/proc/nommu.c +++ b/trunk/fs/proc/nommu.c @@ -91,7 +91,6 @@ static void *nommu_vma_list_start(struct seq_file *m, loff_t *_pos) next = _rb; break; } - pos--; } return next; diff --git a/trunk/include/linux/aio.h b/trunk/include/linux/aio.h index 0decf66117c1..60def658b246 100644 --- a/trunk/include/linux/aio.h +++ b/trunk/include/linux/aio.h @@ -24,12 +24,7 @@ struct kioctx; #define KIOCB_SYNC_KEY (~0U) /* ki_flags bits */ -/* - * This may be used for cancel/retry serialization in the future, but - * for now it's unused and we probably don't want modules to even - * think they can use it. - */ -/* #define KIF_LOCKED 0 */ +#define KIF_LOCKED 0 #define KIF_KICKED 1 #define KIF_CANCELLED 2 diff --git a/trunk/include/linux/cpumask.h b/trunk/include/linux/cpumask.h index 9bdba8169b41..fe9778301d07 100644 --- a/trunk/include/linux/cpumask.h +++ b/trunk/include/linux/cpumask.h @@ -393,13 +393,15 @@ extern cpumask_t cpu_present_map; #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) /* Find the highest possible smp_processor_id() */ -#define highest_possible_processor_id() \ -({ \ - unsigned int cpu, highest = 0; \ - for_each_cpu_mask(cpu, cpu_possible_map) \ - highest = cpu; \ - highest; \ -}) +static inline unsigned int highest_possible_processor_id(void) +{ + unsigned int cpu, highest = 0; + + for_each_cpu_mask(cpu, cpu_possible_map) + highest = cpu; + + return highest; +} #endif /* __LINUX_CPUMASK_H */ diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index 084971f333fe..e6ec59682274 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -442,14 +442,12 @@ static inline void list_splice_init(struct list_head *list, * as long as the traversal is guarded by rcu_read_lock(). */ #define list_for_each_rcu(pos, head) \ - for (pos = (head)->next; \ - prefetch(rcu_dereference(pos)->next), pos != (head); \ - pos = pos->next) + for (pos = (head)->next; prefetch(pos->next), pos != (head); \ + pos = rcu_dereference(pos->next)) #define __list_for_each_rcu(pos, head) \ - for (pos = (head)->next; \ - rcu_dereference(pos) != (head); \ - pos = pos->next) + for (pos = (head)->next; pos != (head); \ + pos = rcu_dereference(pos->next)) /** * list_for_each_safe_rcu - iterate over an rcu-protected list safe @@ -463,9 +461,8 @@ static inline void list_splice_init(struct list_head *list, * as long as the traversal is guarded by rcu_read_lock(). */ #define list_for_each_safe_rcu(pos, n, head) \ - for (pos = (head)->next; \ - n = rcu_dereference(pos)->next, pos != (head); \ - pos = n) + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = rcu_dereference(n), n = pos->next) /** * list_for_each_entry_rcu - iterate over rcu list of given type @@ -477,11 +474,11 @@ static inline void list_splice_init(struct list_head *list, * the _rcu list-mutation primitives such as list_add_rcu() * as long as the traversal is guarded by rcu_read_lock(). */ -#define list_for_each_entry_rcu(pos, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member); \ - prefetch(rcu_dereference(pos)->member.next), \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) +#define list_for_each_entry_rcu(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member); \ + prefetch(pos->member.next), &pos->member != (head); \ + pos = rcu_dereference(list_entry(pos->member.next, \ + typeof(*pos), member))) /** @@ -495,9 +492,8 @@ static inline void list_splice_init(struct list_head *list, * as long as the traversal is guarded by rcu_read_lock(). */ #define list_for_each_continue_rcu(pos, head) \ - for ((pos) = (pos)->next; \ - prefetch(rcu_dereference((pos))->next), (pos) != (head); \ - (pos) = (pos)->next) + for ((pos) = (pos)->next; prefetch((pos)->next), (pos) != (head); \ + (pos) = rcu_dereference((pos)->next)) /* * Double linked lists with a single pointer list head. @@ -700,9 +696,8 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, pos = n) #define hlist_for_each_rcu(pos, head) \ - for ((pos) = (head)->first; \ - rcu_dereference((pos)) && ({ prefetch((pos)->next); 1; }); \ - (pos) = (pos)->next) + for ((pos) = (head)->first; pos && ({ prefetch((pos)->next); 1; }); \ + (pos) = rcu_dereference((pos)->next)) /** * hlist_for_each_entry - iterate over list of given type @@ -767,9 +762,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, */ #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ for (pos = (head)->first; \ - rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \ + pos && ({ prefetch(pos->next); 1;}) && \ ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = pos->next) + pos = rcu_dereference(pos->next)) #else #warning "don't include kernel headers in userspace" diff --git a/trunk/include/linux/rcupdate.h b/trunk/include/linux/rcupdate.h index 70191a5a148f..4e65eb44adfd 100644 --- a/trunk/include/linux/rcupdate.h +++ b/trunk/include/linux/rcupdate.h @@ -94,7 +94,6 @@ struct rcu_data { long batch; /* Batch # for current RCU batch */ struct rcu_head *nxtlist; struct rcu_head **nxttail; - long count; /* # of queued items */ struct rcu_head *curlist; struct rcu_head **curtail; struct rcu_head *donelist; diff --git a/trunk/kernel/posix-cpu-timers.c b/trunk/kernel/posix-cpu-timers.c index 7a51a5597c33..ad85d3f0dcc4 100644 --- a/trunk/kernel/posix-cpu-timers.c +++ b/trunk/kernel/posix-cpu-timers.c @@ -424,7 +424,6 @@ static void cleanup_timers(struct list_head *head, cputime_t ptime = cputime_add(utime, stime); list_for_each_entry_safe(timer, next, head, entry) { - put_task_struct(timer->task); timer->task = NULL; list_del_init(&timer->entry); if (cputime_lt(timer->expires.cpu, ptime)) { @@ -437,7 +436,6 @@ static void cleanup_timers(struct list_head *head, ++head; list_for_each_entry_safe(timer, next, head, entry) { - put_task_struct(timer->task); timer->task = NULL; list_del_init(&timer->entry); if (cputime_lt(timer->expires.cpu, utime)) { @@ -450,7 +448,6 @@ static void cleanup_timers(struct list_head *head, ++head; list_for_each_entry_safe(timer, next, head, entry) { - put_task_struct(timer->task); timer->task = NULL; list_del_init(&timer->entry); if (timer->expires.sched < sched_time) { diff --git a/trunk/kernel/rcupdate.c b/trunk/kernel/rcupdate.c index 2559d4b8f23f..bef3b6901b76 100644 --- a/trunk/kernel/rcupdate.c +++ b/trunk/kernel/rcupdate.c @@ -71,7 +71,7 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L }; /* Fake initialization required by compiler */ static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; -static int maxbatch = 10000; +static int maxbatch = 10; #ifndef __HAVE_ARCH_CMPXCHG /* @@ -109,10 +109,6 @@ void fastcall call_rcu(struct rcu_head *head, rdp = &__get_cpu_var(rcu_data); *rdp->nxttail = head; rdp->nxttail = &head->next; - - if (unlikely(++rdp->count > 10000)) - set_need_resched(); - local_irq_restore(flags); } @@ -144,12 +140,6 @@ void fastcall call_rcu_bh(struct rcu_head *head, rdp = &__get_cpu_var(rcu_bh_data); *rdp->nxttail = head; rdp->nxttail = &head->next; - rdp->count++; -/* - * Should we directly call rcu_do_batch() here ? - * if (unlikely(rdp->count > 10000)) - * rcu_do_batch(rdp); - */ local_irq_restore(flags); } @@ -167,7 +157,6 @@ static void rcu_do_batch(struct rcu_data *rdp) next = rdp->donelist = list->next; list->func(list); list = next; - rdp->count--; if (++count >= maxbatch) break; } diff --git a/trunk/lib/.gitignore b/trunk/lib/.gitignore deleted file mode 100644 index 3bef1ea94c99..000000000000 --- a/trunk/lib/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# -# Generated files -# -gen_crc32table -crc32table.h - diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index 64f9570cff56..0ea71e887bb6 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -511,11 +511,10 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) * PageDirty _after_ making sure that the page is freeable and * not in use by anybody. (pagecache + us == 2) */ - if (unlikely(page_count(page) != 2)) - goto cannot_free; - smp_rmb(); - if (unlikely(PageDirty(page))) - goto cannot_free; + if (page_count(page) != 2 || PageDirty(page)) { + write_unlock_irq(&mapping->tree_lock); + goto keep_locked; + } #ifdef CONFIG_SWAP if (PageSwapCache(page)) { @@ -539,10 +538,6 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) __pagevec_release_nonlru(&freed_pvec); continue; -cannot_free: - write_unlock_irq(&mapping->tree_lock); - goto keep_locked; - activate_locked: SetPageActive(page); pgactivate++; diff --git a/trunk/net/ipv6/netfilter/ip6_tables.c b/trunk/net/ipv6/netfilter/ip6_tables.c index 21deec25a12b..b03e90649eb5 100644 --- a/trunk/net/ipv6/netfilter/ip6_tables.c +++ b/trunk/net/ipv6/netfilter/ip6_tables.c @@ -975,6 +975,7 @@ replace_table(struct ip6t_table *table, struct ip6t_entry *table_base; unsigned int i; + for (i = 0; i < num_possible_cpus(); i++) { for_each_cpu(i) { table_base = (void *)newinfo->entries diff --git a/trunk/scripts/.gitignore b/trunk/scripts/.gitignore deleted file mode 100644 index b46d68bb9e17..000000000000 --- a/trunk/scripts/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -conmakehash -kallsyms -pnmtologo - diff --git a/trunk/scripts/basic/.gitignore b/trunk/scripts/basic/.gitignore deleted file mode 100644 index 7304e19782c7..000000000000 --- a/trunk/scripts/basic/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -fixdep -split-include -docproc diff --git a/trunk/scripts/kconfig/.gitignore b/trunk/scripts/kconfig/.gitignore deleted file mode 100644 index 2dac3442e0ac..000000000000 --- a/trunk/scripts/kconfig/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# Generated files -# -config* -lex.*.c -*.tab.c -*.tab.h - -# -# configuration programs -# -conf -mconf -qconf -gconf -kxgettext diff --git a/trunk/scripts/mod/.gitignore b/trunk/scripts/mod/.gitignore deleted file mode 100644 index e9b7abe7b95b..000000000000 --- a/trunk/scripts/mod/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -elfconfig.h -mk_elfconfig -modpost - diff --git a/trunk/usr/.gitignore b/trunk/usr/.gitignore deleted file mode 100644 index be186a82e8d0..000000000000 --- a/trunk/usr/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# -# Generated files -# -gen_init_cpio -initramfs_data.cpio -initramfs_data.cpio.gz -initramfs_list