]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 24 Apr 2007 16:36:53 +0000 (09:36 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 24 Apr 2007 16:36:53 +0000 (09:36 -0700)
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
  [PATCH] i386: Fix some warnings added by earlier patch
  [PATCH] x86-64: Always flush all pages in change_page_attr
  [PATCH] x86: Remove noreplacement option
  [PATCH] x86-64: make GART PTEs uncacheable

19 files changed:
.mailmap
MAINTAINERS
drivers/acpi/thermal.c
drivers/block/paride/pcd.c
drivers/block/paride/pf.c
drivers/char/mxser.c
drivers/char/mxser_new.c
drivers/hwmon/w83627ehf.c
drivers/pci/probe.c
drivers/serial/8250.c
drivers/serial/icom.c
drivers/serial/icom.h
drivers/video/Kconfig
fs/9p/vfs_inode.c
fs/reiserfs/xattr.c
include/linux/taskstats.h
kernel/sysctl.c
mm/migrate.c
mm/oom_kill.c

index bf62dbea88e613d8a22a6f9977289b4eb2eb968b..ebf9bf84da0aab5ed944264a5db2a65fe3a3e883 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -67,6 +67,8 @@ Koushik <raghavendra.koushik@neterion.com>
 Leonid I Ananiev <leonid.i.ananiev@intel.com>
 Linas Vepstas <linas@austin.ibm.com>
 Matthieu CASTET <castet.matthieu@free.fr>
+Michael Buesch <mb@bu3sch.de>
+Michael Buesch <mbuesch@freenet.de>
 Michel Dänzer <michel@tungstengraphics.com>
 Mitesh shah <mshah@teja.com>
 Morten Welinder <terra@gnome.org>
index ef84419ade3ac2994e9ac6ea67ce4adde7a477cc..277877a34ef620f4a43614018e4cd2f89b74d921 100644 (file)
@@ -1318,7 +1318,7 @@ S:        Maintained
 ETHERNET BRIDGE
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     bridge@lists.osdl.org
+L:     bridge@lists.linux-foundation.org
 W:     http://bridge.sourceforge.net/
 S:     Maintained
 
@@ -1355,6 +1355,11 @@ M:       kevin.curtis@farsite.co.uk
 W:     http://www.farsite.co.uk/
 S:     Supported
 
+FAULT INJECTION SUPPORT
+P:     Akinobu Mita
+M:     akinobu.mita@gmail.com
+S:     Supported
+
 FRAMEBUFFER LAYER
 P:     Antonino Daplas
 M:     adaplas@gmail.com
@@ -1690,7 +1695,7 @@ S:        Maintained
 
 IEEE 1394 SUBSYSTEM
 P:     Ben Collins
-M:     bcollins@debian.org
+M:     ben.collins@ubuntu.com
 P:     Stefan Richter
 M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
@@ -1698,25 +1703,11 @@ W:      http://www.linux1394.org/
 T:     git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
 S:     Maintained
 
-IEEE 1394 IPV4 DRIVER (eth1394)
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 PCILYNX DRIVER
-P:     Jody McIntyre
-M:     scjody@modernduck.com
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 RAW I/O DRIVER
-P:     Ben Collins
-M:     bcollins@debian.org
+IEEE 1394 RAW I/O DRIVER (raw1394)
 P:     Dan Dennedy
 M:     dan@dennedy.org
+P:     Stefan Richter
+M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
 S:     Maintained
 
@@ -1951,7 +1942,7 @@ P:        Vivek Goyal
 M:     vgoyal@in.ibm.com
 P:     Haren Myneni
 M:     hbabu@us.ibm.com
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 L:     linux-kernel@vger.kernel.org
 W:     http://lse.sourceforge.net/kdump/
 S:     Maintained
@@ -1978,7 +1969,7 @@ S:        Maintained
 
 KERNEL JANITORS
 P:     Several
-L:     kernel-janitors@lists.osdl.org
+L:     kernel-janitors@lists.linux-foundation.org
 W:     http://www.kerneljanitors.org/
 S:     Maintained
 
@@ -2001,7 +1992,7 @@ P:        Eric Biederman
 M:     ebiederm@xmission.com
 W:     http://www.xmission.com/~ebiederm/files/kexec/
 L:     linux-kernel@vger.kernel.org
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 S:     Maintained
 
 KPROBES
@@ -2339,7 +2330,7 @@ S:        Maintained
 NETEM NETWORK EMULATOR
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     netem@lists.osdl.org
+L:     netem@lists.linux-foundation.org
 S:     Maintained
 
 NETFILTER/IPTABLES/IPCHAINS
@@ -3068,7 +3059,7 @@ S:        Supported
 SOFTWARE SUSPEND:
 P:     Pavel Machek
 M:     pavel@suse.cz
-L:     linux-pm@lists.osdl.org
+L:     linux-pm@lists.linux-foundation.org
 S:     Maintained
 
 SONIC NETWORK DRIVER
index 0ae8b9310cbf98d2320dc40800f08b12bb0f7f48..589b98b7b216e5096b9cb74fee45d6ae4035a0c9 100644 (file)
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
                        del_timer(&(tz->timer));
        } else {
                if (timer_pending(&(tz->timer)))
-                       mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
+                       mod_timer(&(tz->timer),
+                                       jiffies + (HZ * sleep_time) / 1000);
                else {
                        tz->timer.data = (unsigned long)tz;
                        tz->timer.function = acpi_thermal_run;
index c852eed91e4b6d82cdea3950271abc17e7f4762d..1eeb8f2cde71e1b05cc988e4a728dbf99e5ef618 100644 (file)
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
 #include <linux/blkdev.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pcd_lock;
+static DEFINE_SPINLOCK(pcd_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);
index 7cdaa19512605d7cc28356d41132426ca0953630..5826508f6731772e8260e8edf8809dab6a11ce4a 100644 (file)
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY};
 #include <linux/blkpg.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pf_spin_lock;
+static DEFINE_SPINLOCK(pf_spin_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);
index a61fb6da5d03f0b757b93c45893f01a8d031ddc8..80a01150b86c40674d9f0158062b2e91bdbff676 100644 (file)
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
                 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
                 * Caller should use TIOCGICOUNT to see which one it was
                 */
-       case TIOCMIWAIT: {
-                       DECLARE_WAITQUEUE(wait, current);
-                       int ret;
+       case TIOCMIWAIT:
+               spin_lock_irqsave(&info->slock, flags);
+               cnow = info->icount;    /* note the counters on entry */
+               spin_unlock_irqrestore(&info->slock, flags);
+
+               wait_event_interruptible(info->delta_msr_wait, ({
+                       cprev = cnow;
                        spin_lock_irqsave(&info->slock, flags);
-                       cprev = info->icount;   /* note the counters on entry */
+                       cnow = info->icount;    /* atomic copy */
                        spin_unlock_irqrestore(&info->slock, flags);
 
-                       add_wait_queue(&info->delta_msr_wait, &wait);
-                       while (1) {
-                               spin_lock_irqsave(&info->slock, flags);
-                               cnow = info->icount;    /* atomic copy */
-                               spin_unlock_irqrestore(&info->slock, flags);
-
-                               set_current_state(TASK_INTERRUPTIBLE);
-                               if (((arg & TIOCM_RNG) &&
-                                               (cnow.rng != cprev.rng)) ||
-                                               ((arg & TIOCM_DSR) &&
-                                               (cnow.dsr != cprev.dsr)) ||
-                                               ((arg & TIOCM_CD) &&
-                                               (cnow.dcd != cprev.dcd)) ||
-                                               ((arg & TIOCM_CTS) &&
-                                               (cnow.cts != cprev.cts))) {
-                                       ret = 0;
-                                       break;
-                               }
-                               /* see if a signal did it */
-                               if (signal_pending(current)) {
-                                       ret = -ERESTARTSYS;
-                                       break;
-                               }
-                               cprev = cnow;
-                       }
-                       current->state = TASK_RUNNING;
-                       remove_wait_queue(&info->delta_msr_wait, &wait);
-                       break;
-               }
-               /* NOTREACHED */
+                       ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+                       ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+                       ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
+                       ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
+               }));
+               break;
                /*
                 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
                 * Return: write counters to the user passed counter struct
index 9af07e4999d5f0cac406a3f2200adad82b27dcca..f7603b6aeb87e3ec526d6550ce9ce2d1e42aa600 100644 (file)
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
                 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
                 * Caller should use TIOCGICOUNT to see which one it was
                 */
-       case TIOCMIWAIT: {
-               DECLARE_WAITQUEUE(wait, current);
-               int ret;
+       case TIOCMIWAIT:
                spin_lock_irqsave(&info->slock, flags);
-               cprev = info->icount;   /* note the counters on entry */
+               cnow = info->icount;    /* note the counters on entry */
                spin_unlock_irqrestore(&info->slock, flags);
 
-               add_wait_queue(&info->delta_msr_wait, &wait);
-               while (1) {
+               wait_event_interruptible(info->delta_msr_wait, ({
+                       cprev = cnow;
                        spin_lock_irqsave(&info->slock, flags);
                        cnow = info->icount;    /* atomic copy */
                        spin_unlock_irqrestore(&info->slock, flags);
 
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       if (((arg & TIOCM_RNG) &&
-                                       (cnow.rng != cprev.rng)) ||
-                                       ((arg & TIOCM_DSR) &&
-                                       (cnow.dsr != cprev.dsr)) ||
-                                       ((arg & TIOCM_CD) &&
-                                       (cnow.dcd != cprev.dcd)) ||
-                                       ((arg & TIOCM_CTS) &&
-                                       (cnow.cts != cprev.cts))) {
-                               ret = 0;
-                               break;
-                       }
-                       /* see if a signal did it */
-                       if (signal_pending(current)) {
-                               ret = -ERESTARTSYS;
-                               break;
-                       }
-                       cprev = cnow;
-               }
-               current->state = TASK_RUNNING;
-               remove_wait_queue(&info->delta_msr_wait, &wait);
+                       ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+                       ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+                       ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
+                       ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
+               }));
                break;
-       }
-       /* NOTREACHED */
        /*
         * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
         * Return: write counters to the user passed counter struct
@@ -2230,7 +2210,14 @@ end_intr:
        port->mon_data.rxcnt += cnt;
        port->mon_data.up_rxcnt += cnt;
 
+       /*
+        * We are called from an interrupt context with &port->slock
+        * being held. Drop it temporarily in order to prevent
+        * recursive locking.
+        */
+       spin_unlock(&port->slock);
        tty_flip_buffer_push(tty);
+       spin_lock(&port->slock);
 }
 
 static void mxser_transmit_chars(struct mxser_port *port)
index 01206ebb1cf231a9a68874d16d8b4874d7067471..30a76404f0af31f965d4f48387b64e744ea73f27 100644 (file)
@@ -121,9 +121,9 @@ superio_exit(void)
  * ISA constants
  */
 
-#define REGION_ALIGNMENT       ~7
-#define REGION_OFFSET          5
-#define REGION_LENGTH          2
+#define IOREGION_ALIGNMENT     ~7
+#define IOREGION_OFFSET                5
+#define IOREGION_LENGTH                2
 #define ADDR_REG_OFFSET                5
 #define DATA_REG_OFFSET                6
 
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
        u8 fan4pin, fan5pin;
        int i, err = 0;
 
-       if (!request_region(address + REGION_OFFSET, REGION_LENGTH,
+       if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH,
                            w83627ehf_driver.driver.name)) {
                err = -EBUSY;
                goto exit;
@@ -1322,7 +1322,7 @@ exit_remove:
 exit_free:
        kfree(data);
 exit_release:
-       release_region(address + REGION_OFFSET, REGION_LENGTH);
+       release_region(address + IOREGION_OFFSET, IOREGION_LENGTH);
 exit:
        return err;
 }
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client *client)
 
        if ((err = i2c_detach_client(client)))
                return err;
-       release_region(client->addr + REGION_OFFSET, REGION_LENGTH);
+       release_region(client->addr + IOREGION_OFFSET, IOREGION_LENGTH);
        kfree(data);
 
        return 0;
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr)
        superio_select(W83627EHF_LD_HWM);
        val = (superio_inb(SIO_REG_ADDR) << 8)
            | superio_inb(SIO_REG_ADDR + 1);
-       *addr = val & REGION_ALIGNMENT;
+       *addr = val & IOREGION_ALIGNMENT;
        if (*addr == 0) {
                superio_exit();
                return -ENODEV;
index a4a96826d9e0e9a31057aa920bc4b9fd72683d0d..2fe1d690eb137087ac1c957c9e16f2890a962616 100644 (file)
@@ -682,34 +682,7 @@ static void pci_read_irq(struct pci_dev *dev)
        dev->irq = irq;
 }
 
-static void change_legacy_io_resource(struct pci_dev * dev, unsigned index,
-                                      unsigned start, unsigned end)
-{
-       unsigned base = start & PCI_BASE_ADDRESS_IO_MASK;
-       unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1;
-
-       /*
-        * Some X versions get confused when the BARs reported through
-        * /sys or /proc differ from those seen in config space, thus
-        * try to update the config space values, too.
-        */
-       if (!(pci_resource_flags(dev, index) & IORESOURCE_IO))
-               printk(KERN_WARNING "%s: cannot adjust BAR%u (not I/O)\n",
-                      pci_name(dev), index);
-       else if (pci_resource_len(dev, index) != len)
-               printk(KERN_WARNING "%s: cannot adjust BAR%u (size %04X)\n",
-                      pci_name(dev), index, (unsigned)pci_resource_len(dev, index));
-       else {
-               printk(KERN_INFO "%s: trying to change BAR%u from %04X to %04X\n",
-                      pci_name(dev), index,
-                      (unsigned)pci_resource_start(dev, index), base);
-               pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, base);
-       }
-       pci_resource_start(dev, index) = start;
-       pci_resource_end(dev, index)   = end;
-       pci_resource_flags(dev, index) =
-               IORESOURCE_IO | IORESOURCE_PCI_FIXED | PCI_BASE_ADDRESS_SPACE_IO;
-}
+#define LEGACY_IO_RESOURCE     (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
 
 /**
  * pci_setup_device - fill in class and map information of a device
@@ -762,12 +735,20 @@ static int pci_setup_device(struct pci_dev * dev)
                        u8 progif;
                        pci_read_config_byte(dev, PCI_CLASS_PROG, &progif);
                        if ((progif & 1) == 0) {
-                               change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7);
-                               change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6);
+                               dev->resource[0].start = 0x1F0;
+                               dev->resource[0].end = 0x1F7;
+                               dev->resource[0].flags = LEGACY_IO_RESOURCE;
+                               dev->resource[1].start = 0x3F6;
+                               dev->resource[1].end = 0x3F6;
+                               dev->resource[1].flags = LEGACY_IO_RESOURCE;
                        }
                        if ((progif & 4) == 0) {
-                               change_legacy_io_resource(dev, 2, 0x170, 0x177);
-                               change_legacy_io_resource(dev, 3, 0x376, 0x376);
+                               dev->resource[2].start = 0x170;
+                               dev->resource[2].end = 0x177;
+                               dev->resource[2].flags = LEGACY_IO_RESOURCE;
+                               dev->resource[3].start = 0x376;
+                               dev->resource[3].end = 0x376;
+                               dev->resource[3].flags = LEGACY_IO_RESOURCE;
                        }
                }
                break;
index c129a0e8e8070166144e2cf9f8a1fe3003d19766..90621c3312bc662b4d97f178cd3f3cc14cc16d33 100644 (file)
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
 {
        unsigned int status = serial_in(up, UART_MSR);
 
-       if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) {
+       if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
+           up->port.info != NULL) {
                if (status & UART_MSR_TERI)
                        up->port.icount.rng++;
                if (status & UART_MSR_DDSR)
@@ -1333,8 +1334,9 @@ static inline void
 serial8250_handle_port(struct uart_8250_port *up)
 {
        unsigned int status;
+       unsigned long flags;
 
-       spin_lock(&up->port.lock);
+       spin_lock_irqsave(&up->port.lock, flags);
 
        status = serial_inp(up, UART_LSR);
 
@@ -1346,7 +1348,7 @@ serial8250_handle_port(struct uart_8250_port *up)
        if (status & UART_LSR_THRE)
                transmit_chars(up);
 
-       spin_unlock(&up->port.lock);
+       spin_unlock_irqrestore(&up->port.lock, flags);
 }
 
 /*
index 41431d0d5512633f184f6fb8c92cd5aad6ed343a..246c5572667b141e139705f1718c84d4410ad3a6 100644 (file)
@@ -164,7 +164,7 @@ static void free_port_memory(struct icom_port *icom_port)
        }
 }
 
-static int __init get_port_memory(struct icom_port *icom_port)
+static int __devinit get_port_memory(struct icom_port *icom_port)
 {
        int index;
        unsigned long stgAddr;
@@ -1380,7 +1380,7 @@ static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *i
                            0x8024 + 2 - 2 * (icom_port->port - 2);
        }
 }
-static int __init icom_load_ports(struct icom_adapter *icom_adapter)
+static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
 {
        struct icom_port *icom_port;
        int port_num;
@@ -1473,7 +1473,7 @@ static void icom_remove_adapter(struct icom_adapter *icom_adapter)
                }
        }
 
-       free_irq(icom_adapter->irq_number, (void *) icom_adapter);
+       free_irq(icom_adapter->pci_dev->irq, (void *) icom_adapter);
        iounmap(icom_adapter->base_addr);
        icom_free_adapter(icom_adapter);
        pci_release_regions(icom_adapter->pci_dev);
@@ -1539,7 +1539,6 @@ static int __devinit icom_probe(struct pci_dev *dev,
        }
 
         icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
-        icom_adapter->irq_number = dev->irq;
         icom_adapter->pci_dev = dev;
         icom_adapter->version = ent->driver_data;
         icom_adapter->subsystem_id = ent->subdevice;
@@ -1570,7 +1569,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
                icom_port = &icom_adapter->port_info[index];
 
                if (icom_port->status == ICOM_PORT_ACTIVE) {
-                       icom_port->uart_port.irq = icom_port->adapter->irq_number;
+                       icom_port->uart_port.irq = icom_port->adapter->pci_dev->irq;
                        icom_port->uart_port.type = PORT_ICOM;
                        icom_port->uart_port.iotype = UPIO_MEM;
                        icom_port->uart_port.membase =
index 798f1ef237128e8e5d3a672247c8b53faab67bcd..e8578d8cd35e8c9b0f428aa4b6467ba01b75e3bf 100644 (file)
@@ -258,7 +258,6 @@ struct icom_port {
 struct icom_adapter {
        void __iomem * base_addr;
        unsigned long base_addr_pci;
-       unsigned char irq_number;
        struct pci_dev *pci_dev;
        struct icom_port port_info[4];
        int index;
index e4f0dd00ae85a51098a02ef5e3acdba79c93f640..8372ace4a0d936181b0dee19e17e100ad127e7d7 100644 (file)
@@ -139,7 +139,7 @@ config FB_TILEBLITTING
         This is particularly important to one driver, matroxfb.  If
         unsure, say N.
 
-comment "Frambuffer hardware drivers"
+comment "Frambuffer hardware drivers"
        depends on FB
 
 config FB_CIRRUS
index 124a085d1f2e16265da9658cb339bbfb87e15287..b01b0a457932bb19b125bf62039beddda0bf871d 100644 (file)
@@ -415,7 +415,7 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
        file_inode = file->d_inode;
        sb = file_inode->i_sb;
        v9ses = v9fs_inode2v9ses(file_inode);
-       v9fid = v9fs_fid_lookup(file);
+       v9fid = v9fs_fid_clone(file);
        if(IS_ERR(v9fid))
                return PTR_ERR(v9fid);
 
index f01389fd162e0a3d7befea369945546ea1355528..c8178b7b92123d3474fb40979ee2c596c432d099 100644 (file)
 static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char
                                                                *prefix);
 
-static struct dentry *create_xa_root(struct super_block *sb)
+/* Returns the dentry referring to the root of the extended attribute
+ * directory tree. If it has already been retrieved, it is used. If it
+ * hasn't been created and the flags indicate creation is allowed, we
+ * attempt to create it. On error, we return a pointer-encoded error.
+ */
+static struct dentry *get_xa_root(struct super_block *sb, int flags)
 {
        struct dentry *privroot = dget(REISERFS_SB(sb)->priv_root);
        struct dentry *xaroot;
 
        /* This needs to be created at mount-time */
        if (!privroot)
-               return ERR_PTR(-EOPNOTSUPP);
+               return ERR_PTR(-ENODATA);
 
-       xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
-       if (IS_ERR(xaroot)) {
+       mutex_lock(&privroot->d_inode->i_mutex);
+       if (REISERFS_SB(sb)->xattr_root) {
+               xaroot = dget(REISERFS_SB(sb)->xattr_root);
                goto out;
-       } else if (!xaroot->d_inode) {
-               int err;
-               mutex_lock(&privroot->d_inode->i_mutex);
-               err =
-                   privroot->d_inode->i_op->mkdir(privroot->d_inode, xaroot,
-                                                  0700);
-               mutex_unlock(&privroot->d_inode->i_mutex);
-
-               if (err) {
-                       dput(xaroot);
-                       dput(privroot);
-                       return ERR_PTR(err);
-               }
-               REISERFS_SB(sb)->xattr_root = dget(xaroot);
        }
 
-      out:
-       dput(privroot);
-       return xaroot;
-}
-
-/* This will return a dentry, or error, refering to the xa root directory.
- * If the xa root doesn't exist yet, the dentry will be returned without
- * an associated inode. This dentry can be used with ->mkdir to create
- * the xa directory. */
-static struct dentry *__get_xa_root(struct super_block *s)
-{
-       struct dentry *privroot = dget(REISERFS_SB(s)->priv_root);
-       struct dentry *xaroot = NULL;
-
-       if (IS_ERR(privroot) || !privroot)
-               return privroot;
-
        xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
        if (IS_ERR(xaroot)) {
                goto out;
        } else if (!xaroot->d_inode) {
-               dput(xaroot);
-               xaroot = NULL;
-               goto out;
+               int err = -ENODATA;
+               if (flags == 0 || flags & XATTR_CREATE)
+                       err = privroot->d_inode->i_op->mkdir(privroot->d_inode,
+                                                            xaroot, 0700);
+               if (err) {
+                       dput(xaroot);
+                       xaroot = ERR_PTR(err);
+                       goto out;
+               }
        }
-
-       REISERFS_SB(s)->xattr_root = dget(xaroot);
+       REISERFS_SB(sb)->xattr_root = dget(xaroot);
 
       out:
+       mutex_unlock(&privroot->d_inode->i_mutex);
        dput(privroot);
        return xaroot;
 }
 
-/* Returns the dentry (or NULL) referring to the root of the extended
- * attribute directory tree. If it has already been retrieved, it is used.
- * Otherwise, we attempt to retrieve it from disk. It may also return
- * a pointer-encoded error.
- */
-static inline struct dentry *get_xa_root(struct super_block *s)
-{
-       struct dentry *dentry = dget(REISERFS_SB(s)->xattr_root);
-
-       if (!dentry)
-               dentry = __get_xa_root(s);
-
-       return dentry;
-}
-
 /* Opens the directory corresponding to the inode's extended attribute store.
  * If flags allow, the tree to the directory may be created. If creation is
  * prohibited, -ENODATA is returned. */
@@ -138,21 +104,11 @@ static struct dentry *open_xa_dir(const struct inode *inode, int flags)
        struct dentry *xaroot, *xadir;
        char namebuf[17];
 
-       xaroot = get_xa_root(inode->i_sb);
-       if (IS_ERR(xaroot)) {
+       xaroot = get_xa_root(inode->i_sb, flags);
+       if (IS_ERR(xaroot))
                return xaroot;
-       } else if (!xaroot) {
-               if (flags == 0 || flags & XATTR_CREATE) {
-                       xaroot = create_xa_root(inode->i_sb);
-                       if (IS_ERR(xaroot))
-                               return xaroot;
-               }
-               if (!xaroot)
-                       return ERR_PTR(-ENODATA);
-       }
 
        /* ok, we have xaroot open */
-
        snprintf(namebuf, sizeof(namebuf), "%X.%X",
                 le32_to_cpu(INODE_PKEY(inode)->k_objectid),
                 inode->i_generation);
@@ -821,7 +777,7 @@ int reiserfs_delete_xattrs(struct inode *inode)
 
        /* Leftovers besides . and .. -- that's not good. */
        if (dir->d_inode->i_nlink <= 2) {
-               root = get_xa_root(inode->i_sb);
+               root = get_xa_root(inode->i_sb, XATTR_REPLACE);
                reiserfs_write_lock_xattrs(inode->i_sb);
                err = vfs_rmdir(root->d_inode, dir);
                reiserfs_write_unlock_xattrs(inode->i_sb);
index 3fced4798255101b1ec8f19aeb5905cb449bc8d2..a46104a28f66db62236b34c587e09a9422213574 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 
-#define TASKSTATS_VERSION      3
+#define TASKSTATS_VERSION      4
 #define TS_COMM_LEN            32      /* should be >= TASK_COMM_LEN
                                         * in linux/sched.h */
 
@@ -66,7 +66,7 @@ struct taskstats {
        /* Delay waiting for cpu, while runnable
         * count, delay_total NOT updated atomically
         */
-       __u64   cpu_count;
+       __u64   cpu_count __attribute__((aligned(8)));
        __u64   cpu_delay_total;
 
        /* Following four fields atomically updated using task->delays->lock */
@@ -101,14 +101,17 @@ struct taskstats {
 
        /* Basic Accounting Fields start */
        char    ac_comm[TS_COMM_LEN];   /* Command name */
-       __u8    ac_sched;               /* Scheduling discipline */
+       __u8    ac_sched __attribute__((aligned(8)));
+                                       /* Scheduling discipline */
        __u8    ac_pad[3];
-       __u32   ac_uid;                 /* User ID */
+       __u32   ac_uid __attribute__((aligned(8)));
+                                       /* User ID */
        __u32   ac_gid;                 /* Group ID */
        __u32   ac_pid;                 /* Process ID */
        __u32   ac_ppid;                /* Parent process ID */
        __u32   ac_btime;               /* Begin time [sec since 1970] */
-       __u64   ac_etime;               /* Elapsed time [usec] */
+       __u64   ac_etime __attribute__((aligned(8)));
+                                       /* Elapsed time [usec] */
        __u64   ac_utime;               /* User CPU time [usec] */
        __u64   ac_stime;               /* SYstem CPU time [usec] */
        __u64   ac_minflt;              /* Minor Page Fault Count */
index 1b255df4fcd0a4036c1c34fb6da31a0470742f59..c904748f2290d8c48edca2dd451e1d71f4593b49 100644 (file)
@@ -1676,7 +1676,7 @@ static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp,
 {
        int op;
 
-       if (!capable(CAP_SYS_ADMIN))
+       if (write && !capable(CAP_SYS_ADMIN))
                return -EPERM;
 
        op = OP_OR;
index 7a66ca25dc8aa99b77f2a4f041fed0cd8194b6aa..a91ca00abebea3c7b0a8f0317cabfbc02f403d74 100644 (file)
@@ -297,7 +297,7 @@ static int migrate_page_move_mapping(struct address_space *mapping,
        void **pslot;
 
        if (!mapping) {
-               /* Anonymous page */
+               /* Anonymous page without mapping */
                if (page_count(page) != 1)
                        return -EAGAIN;
                return 0;
@@ -333,6 +333,19 @@ static int migrate_page_move_mapping(struct address_space *mapping,
         */
        __put_page(page);
 
+       /*
+        * If moved to a different zone then also account
+        * the page for that zone. Other VM counters will be
+        * taken care of when we establish references to the
+        * new page and drop references to the old page.
+        *
+        * Note that anonymous pages are accounted for
+        * via NR_FILE_PAGES and NR_ANON_PAGES if they
+        * are mapped to swap space.
+        */
+       __dec_zone_page_state(page, NR_FILE_PAGES);
+       __inc_zone_page_state(newpage, NR_FILE_PAGES);
+
        write_unlock_irq(&mapping->tree_lock);
 
        return 0;
index 2f3916986abf7054bc00e4c2fc8ed2ed688d199b..3791edfffeebe9595f54ce7d04fe424832aa6af5 100644 (file)
@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
        struct zone **z;
        nodemask_t nodes;
        int node;
+
+       nodes_clear(nodes);
        /* node has memory ? */
        for_each_online_node(node)
                if (NODE_DATA(node)->node_present_pages)
@@ -333,7 +335,7 @@ static int oom_kill_task(struct task_struct *p)
         */
        do_each_thread(g, q) {
                if (q->mm == mm && q->tgid != p->tgid)
-                       force_sig(SIGKILL, p);
+                       force_sig(SIGKILL, q);
        } while_each_thread(g, q);
 
        return 0;