Changeset 17812


Ignore:
Timestamp:
10/25/11 13:45:09 (19 months ago)
Author:
BrainSlayer
Message:

update to 3.0.8

Location:
src/linux/laguna/linux-3.0
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • src/linux/laguna/linux-3.0/Makefile

    r17795 r17812  
    11VERSION = 3 
    22PATCHLEVEL = 0 
    3 SUBLEVEL = 7 
     3SUBLEVEL = 8 
    44EXTRAVERSION = 
    55NAME = Sneaky Weasel 
  • src/linux/laguna/linux-3.0/arch/arm/kernel/perf_event_v7.c

    r17371 r17812  
    265265        [PERF_COUNT_HW_INSTRUCTIONS]        = 
    266266                                        ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, 
    267         [PERF_COUNT_HW_CACHE_REFERENCES]    = ARMV7_PERFCTR_COHERENT_LINE_HIT, 
    268         [PERF_COUNT_HW_CACHE_MISSES]        = ARMV7_PERFCTR_COHERENT_LINE_MISS, 
     267        [PERF_COUNT_HW_CACHE_REFERENCES]    = ARMV7_PERFCTR_DCACHE_ACCESS, 
     268        [PERF_COUNT_HW_CACHE_MISSES]        = ARMV7_PERFCTR_DCACHE_REFILL, 
    269269        [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 
    270270        [PERF_COUNT_HW_BRANCH_MISSES]       = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 
  • src/linux/laguna/linux-3.0/arch/arm/mm/init.c

    r17371 r17812  
    474474                bank_start = min(bank_start, 
    475475                                 ALIGN(prev_bank_end, PAGES_PER_SECTION)); 
     476#else 
     477                /* 
     478                 * Align down here since the VM subsystem insists that the 
     479                 * memmap entries are valid from the bank start aligned to 
     480                 * MAX_ORDER_NR_PAGES. 
     481                 */ 
     482                bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); 
    476483#endif 
    477484                /* 
  • src/linux/laguna/linux-3.0/arch/x86/mm/init.c

    r17371 r17812  
    6464        /* for fixmap */ 
    6565        tables += roundup(__end_of_fixed_addresses * sizeof(pte_t), PAGE_SIZE); 
    66  
     66#endif 
    6767        good_end = max_pfn_mapped << PAGE_SHIFT; 
    68 #endif 
    6968 
    7069        base = memblock_find_in_range(start, good_end, tables, PAGE_SIZE); 
  • src/linux/laguna/linux-3.0/crypto/ghash-generic.c

    r17371 r17812  
    6868        u8 *dst = dctx->buffer; 
    6969 
     70        if (!ctx->gf128) 
     71                return -ENOKEY; 
     72 
    7073        if (dctx->bytes) { 
    7174                int n = min(srclen, dctx->bytes); 
     
    120123        u8 *buf = dctx->buffer; 
    121124 
     125        if (!ctx->gf128) 
     126                return -ENOKEY; 
     127 
    122128        ghash_flush(ctx, dctx); 
    123129        memcpy(dst, buf, GHASH_BLOCK_SIZE); 
  • src/linux/laguna/linux-3.0/drivers/firewire/sbp2.c

    r17371 r17812  
    11991199        struct fw_unit *unit = fw_unit(dev); 
    12001200        struct sbp2_target *tgt = dev_get_drvdata(&unit->device); 
     1201        struct sbp2_logical_unit *lu; 
     1202 
     1203        list_for_each_entry(lu, &tgt->lu_list, link) 
     1204                cancel_delayed_work_sync(&lu->work); 
    12011205 
    12021206        sbp2_target_put(tgt); 
  • src/linux/laguna/linux-3.0/drivers/gpu/drm/radeon/atom.c

    r17371 r17812  
    278278                idx = U8(*ptr); 
    279279                (*ptr)++; 
    280                 val = gctx->scratch[((gctx->fb_base + idx) / 4)]; 
     280                if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { 
     281                        DRM_ERROR("ATOM: fb read beyond scratch region: %d vs. %d\n", 
     282                                  gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); 
     283                        val = 0; 
     284                } else 
     285                        val = gctx->scratch[(gctx->fb_base / 4) + idx]; 
    281286                if (print) 
    282287                        DEBUG("FB[0x%02X]", idx); 
     
    532537                idx = U8(*ptr); 
    533538                (*ptr)++; 
    534                 gctx->scratch[((gctx->fb_base + idx) / 4)] = val; 
     539                if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { 
     540                        DRM_ERROR("ATOM: fb write beyond scratch region: %d vs. %d\n", 
     541                                  gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); 
     542                } else 
     543                        gctx->scratch[(gctx->fb_base / 4) + idx] = val; 
    535544                DEBUG("FB[0x%02X]", idx); 
    536545                break; 
     
    13681377                usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; 
    13691378        } 
     1379        ctx->scratch_size_bytes = 0; 
    13701380        if (usage_bytes == 0) 
    13711381                usage_bytes = 20 * 1024; 
     
    13741384        if (!ctx->scratch) 
    13751385                return -ENOMEM; 
     1386        ctx->scratch_size_bytes = usage_bytes; 
    13761387        return 0; 
    13771388} 
  • src/linux/laguna/linux-3.0/drivers/gpu/drm/radeon/atom.h

    r17371 r17812  
    138138        int io_mode; 
    139139        uint32_t *scratch; 
     140        int scratch_size_bytes; 
    140141}; 
    141142 
  • src/linux/laguna/linux-3.0/drivers/gpu/drm/ttm/ttm_bo.c

    r17540 r17812  
    393393         */ 
    394394 
    395         if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED) && (bo->ttm == NULL)) { 
    396                 ret = ttm_bo_add_ttm(bo, false); 
    397                 if (ret) 
    398                         goto out_err; 
     395        if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) { 
     396                if (bo->ttm == NULL) { 
     397                        ret = ttm_bo_add_ttm(bo, false); 
     398                        if (ret) 
     399                                goto out_err; 
     400                } 
    399401 
    400402                ret = ttm_tt_set_placement_caching(bo->ttm, mem->placement); 
  • src/linux/laguna/linux-3.0/drivers/gpu/drm/ttm/ttm_bo_util.c

    r17371 r17812  
    636636                        return ret; 
    637637 
    638                 ttm_bo_free_old_node(bo); 
    639638                if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && 
    640639                    (bo->ttm != NULL)) { 
     
    643642                        bo->ttm = NULL; 
    644643                } 
     644                ttm_bo_free_old_node(bo); 
    645645        } else { 
    646646                /** 
  • src/linux/laguna/linux-3.0/drivers/hid/hid-ids.h

    r17371 r17812  
    569569#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE        0x0600 
    570570 
     571#define USB_VENDOR_ID_SIGMA_MICRO       0x1c4f 
     572#define USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD      0x0002 
     573 
    571574#define USB_VENDOR_ID_SKYCABLE                  0x1223 
    572575#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER       0x3F07 
  • src/linux/laguna/linux-3.0/drivers/hid/hid-magicmouse.c

    r17371 r17812  
    502502        report->size = 6; 
    503503 
     504        /* 
     505         * Some devices repond with 'invalid report id' when feature 
     506         * report switching it into multitouch mode is sent to it. 
     507         * 
     508         * This results in -EIO from the _raw low-level transport callback, 
     509         * but there seems to be no other way of switching the mode. 
     510         * Thus the super-ugly hacky success check below. 
     511         */ 
    504512        ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature), 
    505513                        HID_FEATURE_REPORT); 
    506         if (ret != sizeof(feature)) { 
     514        if (ret != -EIO && ret != sizeof(feature)) { 
    507515                hid_err(hdev, "unable to request touch data (%d)\n", ret); 
    508516                goto err_stop_hw; 
  • src/linux/laguna/linux-3.0/drivers/hid/usbhid/hid-quirks.c

    r17371 r17812  
    9090        { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT }, 
    9191        { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT }, 
     92        { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS }, 
    9293        { 0, 0 } 
    9394}; 
  • src/linux/laguna/linux-3.0/drivers/hwmon/w83627ehf.c

    r17371 r17812  
    391391        if (is_word_sized(reg)) 
    392392                return LM75_TEMP_FROM_REG(regval); 
    393         return regval * 1000; 
     393        return ((s8)regval) * 1000; 
    394394} 
    395395 
     
    399399        if (is_word_sized(reg)) 
    400400                return LM75_TEMP_TO_REG(temp); 
    401         return DIV_ROUND_CLOSEST(SENSORS_LIMIT(temp, -127000, 128000), 1000); 
     401        return (s8)DIV_ROUND_CLOSEST(SENSORS_LIMIT(temp, -127000, 128000), 
     402                                     1000); 
    402403} 
    403404 
     
    17161717 
    17171718/* Get the monitoring functions started */ 
    1718 static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data) 
     1719static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data, 
     1720                                                   enum kinds kind) 
    17191721{ 
    17201722        int i; 
     
    17471749 
    17481750        /* Get thermal sensor types */ 
    1749         diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE); 
     1751        switch (kind) { 
     1752        case w83627ehf: 
     1753                diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE); 
     1754                break; 
     1755        default: 
     1756                diode = 0x70; 
     1757        } 
    17501758        for (i = 0; i < 3; i++) { 
    17511759                if ((tmp & (0x02 << i))) 
    1752                         data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 2; 
     1760                        data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 3; 
    17531761                else 
    17541762                        data->temp_type[i] = 4; /* thermistor */ 
     
    20172025 
    20182026        /* Initialize the chip */ 
    2019         w83627ehf_init_device(data); 
     2027        w83627ehf_init_device(data, sio_data->kind); 
    20202028 
    20212029        data->vrm = vid_which_vrm(); 
  • src/linux/laguna/linux-3.0/drivers/media/video/uvc/uvc_entity.c

    r17371 r17812  
    5050                        return -EINVAL; 
    5151 
    52                 source = (UVC_ENTITY_TYPE(remote) != UVC_TT_STREAMING) 
     52                source = (UVC_ENTITY_TYPE(remote) == UVC_TT_STREAMING) 
    5353                       ? (remote->vdev ? &remote->vdev->entity : NULL) 
    5454                       : &remote->subdev.entity; 
  • src/linux/laguna/linux-3.0/drivers/platform/x86/samsung-laptop.c

    r17371 r17812  
    598598                        DMI_MATCH(DMI_PRODUCT_NAME, "R519/R719"), 
    599599                        DMI_MATCH(DMI_BOARD_NAME, "R519/R719"), 
     600                }, 
     601                .callback = dmi_check_cb, 
     602        }, 
     603        { 
     604                .ident = "N150/N210/N220", 
     605                .matches = { 
     606                        DMI_MATCH(DMI_SYS_VENDOR, 
     607                                        "SAMSUNG ELECTRONICS CO., LTD."), 
     608                        DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220"), 
     609                        DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"), 
    600610                }, 
    601611                .callback = dmi_check_cb, 
  • src/linux/laguna/linux-3.0/fs/cifs/cifsfs.c

    r17492 r17812  
    567567                struct dentry *child; 
    568568 
     569                if (!dir) { 
     570                        dput(dentry); 
     571                        dentry = ERR_PTR(-ENOENT); 
     572                        break; 
     573                } 
     574 
    569575                /* skip separators */ 
    570576                while (*s == sep) 
     
    582588                dput(dentry); 
    583589                dentry = child; 
    584                 if (!dentry->d_inode) { 
    585                         dput(dentry); 
    586                         dentry = ERR_PTR(-ENOENT); 
    587                 } 
    588590        } while (!IS_ERR(dentry)); 
    589591        _FreeXid(xid); 
  • src/linux/laguna/linux-3.0/fs/fuse/dev.c

    r17540 r17812  
    259259 
    260260        spin_lock(&fc->lock); 
    261         fc->forget_list_tail->next = forget; 
    262         fc->forget_list_tail = forget; 
    263         wake_up(&fc->waitq); 
    264         kill_fasync(&fc->fasync, SIGIO, POLL_IN); 
     261        if (fc->connected) { 
     262                fc->forget_list_tail->next = forget; 
     263                fc->forget_list_tail = forget; 
     264                wake_up(&fc->waitq); 
     265                kill_fasync(&fc->fasync, SIGIO, POLL_IN); 
     266        } else { 
     267                kfree(forget); 
     268        } 
    265269        spin_unlock(&fc->lock); 
    266270} 
  • src/linux/laguna/linux-3.0/fs/hfsplus/hfsplus_fs.h

    r17371 r17812  
    1414#include <linux/mutex.h> 
    1515#include <linux/buffer_head.h> 
     16#include <linux/blkdev.h> 
    1617#include "hfsplus_raw.h" 
    1718 
     
    111112 
    112113struct hfsplus_sb_info { 
     114        void *s_vhdr_buf; 
    113115        struct hfsplus_vh *s_vhdr; 
     116        void *s_backup_vhdr_buf; 
    114117        struct hfsplus_vh *s_backup_vhdr; 
    115118        struct hfs_btree *ext_tree; 
     
    258261        struct hfsplus_cat_key key; 
    259262}; 
     263 
     264/* 
     265 * Find minimum acceptible I/O size for an hfsplus sb. 
     266 */ 
     267static inline unsigned short hfsplus_min_io_size(struct super_block *sb) 
     268{ 
     269        return max_t(unsigned short, bdev_logical_block_size(sb->s_bdev), 
     270                     HFSPLUS_SECTOR_SIZE); 
     271} 
    260272 
    261273#define hfs_btree_open hfsplus_btree_open 
     
    437449int hfsplus_read_wrapper(struct super_block *); 
    438450int hfs_part_find(struct super_block *, sector_t *, sector_t *); 
    439 int hfsplus_submit_bio(struct block_device *bdev, sector_t sector, 
    440                 void *data, int rw); 
     451int hfsplus_submit_bio(struct super_block *sb, sector_t sector, 
     452                void *buf, void **data, int rw); 
    441453 
    442454/* time macros */ 
  • src/linux/laguna/linux-3.0/fs/hfsplus/part_tbl.c

    r17371 r17812  
    8989} 
    9090 
    91 static int hfs_parse_new_pmap(struct super_block *sb, struct new_pmap *pm, 
    92                 sector_t *part_start, sector_t *part_size) 
     91static int hfs_parse_new_pmap(struct super_block *sb, void *buf, 
     92                struct new_pmap *pm, sector_t *part_start, sector_t *part_size) 
    9393{ 
    9494        struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); 
    9595        int size = be32_to_cpu(pm->pmMapBlkCnt); 
     96        int buf_size = hfsplus_min_io_size(sb); 
    9697        int res; 
    9798        int i = 0; 
     
    108109                        return -ENOENT; 
    109110 
    110                 res = hfsplus_submit_bio(sb->s_bdev, 
    111                                          *part_start + HFS_PMAP_BLK + i, 
    112                                          pm, READ); 
    113                 if (res) 
    114                         return res; 
     111                pm = (struct new_pmap *)((u8 *)pm + HFSPLUS_SECTOR_SIZE); 
     112                if ((u8 *)pm - (u8 *)buf >= buf_size) { 
     113                        res = hfsplus_submit_bio(sb, 
     114                                                 *part_start + HFS_PMAP_BLK + i, 
     115                                                 buf, (void **)&pm, READ); 
     116                        if (res) 
     117                                return res; 
     118                } 
    115119        } while (pm->pmSig == cpu_to_be16(HFS_NEW_PMAP_MAGIC)); 
    116120 
     
    125129                sector_t *part_start, sector_t *part_size) 
    126130{ 
    127         void *data; 
     131        void *buf, *data; 
    128132        int res; 
    129133 
    130         data = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL); 
    131         if (!data) 
     134        buf = kmalloc(hfsplus_min_io_size(sb), GFP_KERNEL); 
     135        if (!buf) 
    132136                return -ENOMEM; 
    133137 
    134         res = hfsplus_submit_bio(sb->s_bdev, *part_start + HFS_PMAP_BLK, 
    135                                  data, READ); 
     138        res = hfsplus_submit_bio(sb, *part_start + HFS_PMAP_BLK, 
     139                                 buf, &data, READ); 
    136140        if (res) 
    137141                goto out; 
     
    142146                break; 
    143147        case HFS_NEW_PMAP_MAGIC: 
    144                 res = hfs_parse_new_pmap(sb, data, part_start, part_size); 
     148                res = hfs_parse_new_pmap(sb, buf, data, part_start, part_size); 
    145149                break; 
    146150        default: 
     
    149153        } 
    150154out: 
    151         kfree(data); 
     155        kfree(buf); 
    152156        return res; 
    153157} 
  • src/linux/laguna/linux-3.0/fs/hfsplus/super.c

    r17371 r17812  
    198198        } 
    199199 
    200         error2 = hfsplus_submit_bio(sb->s_bdev, 
     200        error2 = hfsplus_submit_bio(sb, 
    201201                                   sbi->part_start + HFSPLUS_VOLHEAD_SECTOR, 
    202                                    sbi->s_vhdr, WRITE_SYNC); 
     202                                   sbi->s_vhdr_buf, NULL, WRITE_SYNC); 
    203203        if (!error) 
    204204                error = error2; 
     
    206206                goto out; 
    207207 
    208         error2 = hfsplus_submit_bio(sb->s_bdev, 
     208        error2 = hfsplus_submit_bio(sb, 
    209209                                  sbi->part_start + sbi->sect_count - 2, 
    210                                   sbi->s_backup_vhdr, WRITE_SYNC); 
     210                                  sbi->s_backup_vhdr_buf, NULL, WRITE_SYNC); 
    211211        if (!error) 
    212212                error2 = error; 
     
    252252        iput(sbi->alloc_file); 
    253253        iput(sbi->hidden_dir); 
    254         kfree(sbi->s_vhdr); 
    255         kfree(sbi->s_backup_vhdr); 
     254        kfree(sbi->s_vhdr_buf); 
     255        kfree(sbi->s_backup_vhdr_buf); 
    256256        unload_nls(sbi->nls); 
    257257        kfree(sb->s_fs_info); 
     
    509509        hfs_btree_close(sbi->ext_tree); 
    510510out_free_vhdr: 
    511         kfree(sbi->s_vhdr); 
    512         kfree(sbi->s_backup_vhdr); 
     511        kfree(sbi->s_vhdr_buf); 
     512        kfree(sbi->s_backup_vhdr_buf); 
    513513out_unload_nls: 
    514514        unload_nls(sbi->nls); 
  • src/linux/laguna/linux-3.0/fs/hfsplus/wrapper.c

    r17371 r17812  
    3232} 
    3333 
    34 int hfsplus_submit_bio(struct block_device *bdev, sector_t sector, 
    35                 void *data, int rw) 
     34/* 
     35 * hfsplus_submit_bio - Perfrom block I/O 
     36 * @sb: super block of volume for I/O 
     37 * @sector: block to read or write, for blocks of HFSPLUS_SECTOR_SIZE bytes 
     38 * @buf: buffer for I/O 
     39 * @data: output pointer for location of requested data 
     40 * @rw: direction of I/O 
     41 * 
     42 * The unit of I/O is hfsplus_min_io_size(sb), which may be bigger than 
     43 * HFSPLUS_SECTOR_SIZE, and @buf must be sized accordingly. On reads 
     44 * @data will return a pointer to the start of the requested sector, 
     45 * which may not be the same location as @buf. 
     46 * 
     47 * If @sector is not aligned to the bdev logical block size it will 
     48 * be rounded down. For writes this means that @buf should contain data 
     49 * that starts at the rounded-down address. As long as the data was 
     50 * read using hfsplus_submit_bio() and the same buffer is used things 
     51 * will work correctly. 
     52 */ 
     53int hfsplus_submit_bio(struct super_block *sb, sector_t sector, 
     54                void *buf, void **data, int rw) 
    3655{ 
    3756        DECLARE_COMPLETION_ONSTACK(wait); 
    3857        struct bio *bio; 
    3958        int ret = 0; 
     59        unsigned int io_size; 
     60        loff_t start; 
     61        int offset; 
     62 
     63        /* 
     64         * Align sector to hardware sector size and find offset. We 
     65         * assume that io_size is a power of two, which _should_ 
     66         * be true. 
     67         */ 
     68        io_size = hfsplus_min_io_size(sb); 
     69        start = (loff_t)sector << HFSPLUS_SECTOR_SHIFT; 
     70        offset = start & (io_size - 1); 
     71        sector &= ~((io_size >> HFSPLUS_SECTOR_SHIFT) - 1); 
    4072 
    4173        bio = bio_alloc(GFP_NOIO, 1); 
    4274        bio->bi_sector = sector; 
    43         bio->bi_bdev = bdev; 
     75        bio->bi_bdev = sb->s_bdev; 
    4476        bio->bi_end_io = hfsplus_end_io_sync; 
    4577        bio->bi_private = &wait; 
    4678 
    47         /* 
    48          * We always submit one sector at a time, so bio_add_page must not fail. 
    49          */ 
    50         if (bio_add_page(bio, virt_to_page(data), HFSPLUS_SECTOR_SIZE, 
    51                          offset_in_page(data)) != HFSPLUS_SECTOR_SIZE) 
    52                 BUG(); 
     79        if (!(rw & WRITE) && data) 
     80                *data = (u8 *)buf + offset; 
     81 
     82        while (io_size > 0) { 
     83                unsigned int page_offset = offset_in_page(buf); 
     84                unsigned int len = min_t(unsigned int, PAGE_SIZE - page_offset, 
     85                                         io_size); 
     86 
     87                ret = bio_add_page(bio, virt_to_page(buf), len, page_offset); 
     88                if (ret != len) { 
     89                        ret = -EIO; 
     90                        goto out; 
     91                } 
     92                io_size -= len; 
     93                buf = (u8 *)buf + len; 
     94        } 
    5395 
    5496        submit_bio(rw, bio); 
     
    58100                ret = -EIO; 
    59101 
     102out: 
    60103        bio_put(bio); 
    61         return ret; 
     104        return ret < 0 ? ret : 0; 
    62105} 
    63106 
     
    148191 
    149192        error = -ENOMEM; 
    150         sbi->s_vhdr = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL); 
    151         if (!sbi->s_vhdr) 
    152                 goto out; 
    153         sbi->s_backup_vhdr = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL); 
    154         if (!sbi->s_backup_vhdr) 
     193        sbi->s_vhdr_buf = kmalloc(hfsplus_min_io_size(sb), GFP_KERNEL); 
     194        if (!sbi->s_vhdr_buf) 
     195                goto out; 
     196        sbi->s_backup_vhdr_buf = kmalloc(hfsplus_min_io_size(sb), GFP_KERNEL); 
     197        if (!sbi->s_backup_vhdr_buf) 
    155198                goto out_free_vhdr; 
    156199 
    157200reread: 
    158         error = hfsplus_submit_bio(sb->s_bdev, 
    159                                    part_start + HFSPLUS_VOLHEAD_SECTOR, 
    160                                    sbi->s_vhdr, READ); 
     201        error = hfsplus_submit_bio(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, 
     202                                   sbi->s_vhdr_buf, (void **)&sbi->s_vhdr, 
     203                                   READ); 
    161204        if (error) 
    162205                goto out_free_backup_vhdr; 
     
    187230        } 
    188231 
    189         error = hfsplus_submit_bio(sb->s_bdev, 
    190                                    part_start + part_size - 2, 
    191                                    sbi->s_backup_vhdr, READ); 
     232        error = hfsplus_submit_bio(sb, part_start + part_size - 2, 
     233                                   sbi->s_backup_vhdr_buf, 
     234                                   (void **)&sbi->s_backup_vhdr, READ); 
    192235        if (error) 
    193236                goto out_free_backup_vhdr; 
     
    233276 
    234277out_free_backup_vhdr: 
    235         kfree(sbi->s_backup_vhdr); 
     278        kfree(sbi->s_backup_vhdr_buf); 
    236279out_free_vhdr: 
    237         kfree(sbi->s_vhdr); 
     280        kfree(sbi->s_vhdr_buf); 
    238281out: 
    239282        return error; 
  • src/linux/laguna/linux-3.0/fs/xfs/linux-2.6/xfs_linux.h

    r17371 r17812  
    7171#include <linux/writeback.h> 
    7272#include <linux/capability.h> 
     73#include <linux/kthread.h> 
     74#include <linux/freezer.h> 
    7375#include <linux/list_sort.h> 
    7476 
  • src/linux/laguna/linux-3.0/fs/xfs/linux-2.6/xfs_super.c

    r17371 r17812  
    14131413        set_posix_acl_flag(sb); 
    14141414 
     1415        xfs_inode_shrinker_register(mp); 
     1416 
     1417        error = xfs_mountfs(mp); 
     1418        if (error) 
     1419                goto out_filestream_unmount; 
     1420 
    14151421        error = xfs_syncd_init(mp); 
    14161422        if (error) 
    1417                 goto out_filestream_unmount; 
    1418  
    1419         xfs_inode_shrinker_register(mp); 
    1420  
    1421         error = xfs_mountfs(mp); 
    1422         if (error) 
    1423                 goto out_syncd_stop; 
     1423                goto out_unmount; 
    14241424 
    14251425        root = igrab(VFS_I(mp->m_rootip)); 
    14261426        if (!root) { 
    14271427                error = ENOENT; 
    1428                 goto fail_unmount; 
     1428                goto out_syncd_stop; 
    14291429        } 
    14301430        if (is_bad_inode(root)) { 
    14311431                error = EINVAL; 
    1432                 goto fail_vnrele; 
     1432                goto out_syncd_stop; 
    14331433        } 
    14341434        sb->s_root = d_alloc_root(root); 
    14351435        if (!sb->s_root) { 
    14361436                error = ENOMEM; 
    1437                 goto fail_vnrele; 
     1437                goto out_iput; 
    14381438        } 
    14391439 
    14401440        return 0; 
    14411441 
    1442  out_syncd_stop: 
     1442 out_filestream_unmount: 
    14431443        xfs_inode_shrinker_unregister(mp); 
    1444         xfs_syncd_stop(mp); 
    1445  out_filestream_unmount: 
    14461444        xfs_filestream_unmount(mp); 
    14471445 out_free_sb: 
     
    14571455        return -error; 
    14581456 
    1459  fail_vnrele: 
    1460         if (sb->s_root) { 
    1461                 dput(sb->s_root); 
    1462                 sb->s_root = NULL; 
    1463         } else { 
    1464                 iput(root); 
    1465         } 
    1466  
    1467  fail_unmount: 
     1457 out_iput: 
     1458        iput(root); 
     1459 out_syncd_stop: 
     1460        xfs_syncd_stop(mp); 
     1461 out_unmount: 
    14681462        xfs_inode_shrinker_unregister(mp); 
    1469         xfs_syncd_stop(mp); 
    14701463 
    14711464        /* 
     
    16681661        xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_CPU_INTENSIVE, 8); 
    16691662        if (!xfs_syncd_wq) 
    1670                 goto out; 
    1671  
    1672         xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8); 
    1673         if (!xfs_ail_wq) 
    1674                 goto out_destroy_syncd; 
    1675  
     1663                return -ENOMEM; 
    16761664        return 0; 
    1677  
    1678 out_destroy_syncd: 
    1679         destroy_workqueue(xfs_syncd_wq); 
    1680 out: 
    1681         return -ENOMEM; 
    16821665} 
    16831666 
     
    16851668xfs_destroy_workqueues(void) 
    16861669{ 
    1687         destroy_workqueue(xfs_ail_wq); 
    16881670        destroy_workqueue(xfs_syncd_wq); 
    16891671} 
  • src/linux/laguna/linux-3.0/fs/xfs/quota/xfs_dquot_item.c

    r17371 r17812  
    184184 * spinlock. 
    185185 */ 
    186 STATIC void 
     186STATIC bool 
    187187xfs_qm_dquot_logitem_pushbuf( 
    188188        struct xfs_log_item     *lip) 
     
    191191        struct xfs_dquot        *dqp = qlip->qli_dquot; 
    192192        struct xfs_buf          *bp; 
     193        bool                    ret = true; 
    193194 
    194195        ASSERT(XFS_DQ_IS_LOCKED(dqp)); 
     
    202203            !(lip->li_flags & XFS_LI_IN_AIL)) { 
    203204                xfs_dqunlock(dqp); 
    204                 return; 
     205                return true; 
    205206        } 
    206207 
     
    209210        xfs_dqunlock(dqp); 
    210211        if (!bp) 
    211                 return; 
     212                return true; 
    212213        if (XFS_BUF_ISDELAYWRITE(bp)) 
    213214                xfs_buf_delwri_promote(bp); 
     215        if (XFS_BUF_ISPINNED(bp)) 
     216                ret = false; 
    214217        xfs_buf_relse(bp); 
     218        return ret; 
    215219} 
    216220 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_buf_item.c

    r17371 r17812  
    633633 * to allow the xfsbufd to write it, too. 
    634634 */ 
    635 STATIC void 
     635STATIC bool 
    636636xfs_buf_item_pushbuf( 
    637637        struct xfs_log_item     *lip) 
     
    647647        xfs_buf_delwri_promote(bp); 
    648648        xfs_buf_relse(bp); 
     649        return true; 
    649650} 
    650651 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_inode_item.c

    r17371 r17812  
    714714 * allow the caller to write the buffer by triggering the xfsbufd to run. 
    715715 */ 
    716 STATIC void 
     716STATIC bool 
    717717xfs_inode_item_pushbuf( 
    718718        struct xfs_log_item     *lip) 
     
    721721        struct xfs_inode        *ip = iip->ili_inode; 
    722722        struct xfs_buf          *bp; 
     723        bool                    ret = true; 
    723724 
    724725        ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED)); 
     
    731732            !(lip->li_flags & XFS_LI_IN_AIL)) { 
    732733                xfs_iunlock(ip, XFS_ILOCK_SHARED); 
    733                 return; 
     734                return true; 
    734735        } 
    735736 
     
    739740        xfs_iunlock(ip, XFS_ILOCK_SHARED); 
    740741        if (!bp) 
    741                 return; 
     742                return true; 
    742743        if (XFS_BUF_ISDELAYWRITE(bp)) 
    743744                xfs_buf_delwri_promote(bp); 
     745        if (XFS_BUF_ISPINNED(bp)) 
     746                ret = false; 
    744747        xfs_buf_relse(bp); 
     748        return ret; 
    745749} 
    746750 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_trans.c

    r17371 r17812  
    14271427xfs_log_item_batch_insert( 
    14281428        struct xfs_ail          *ailp, 
     1429        struct xfs_ail_cursor   *cur, 
    14291430        struct xfs_log_item     **log_items, 
    14301431        int                     nr_items, 
     
    14351436        spin_lock(&ailp->xa_lock); 
    14361437        /* xfs_trans_ail_update_bulk drops ailp->xa_lock */ 
    1437         xfs_trans_ail_update_bulk(ailp, log_items, nr_items, commit_lsn); 
     1438        xfs_trans_ail_update_bulk(ailp, cur, log_items, nr_items, commit_lsn); 
    14381439 
    14391440        for (i = 0; i < nr_items; i++) 
     
    14531454 * this case all we need to do is IOP_COMMITTED processing, followed by an 
    14541455 * IOP_UNPIN(aborted) call. 
     1456 * 
     1457 * The AIL cursor is used to optimise the insert process. If commit_lsn is not 
     1458 * at the end of the AIL, the insert cursor avoids the need to walk 
     1459 * the AIL to find the insertion point on every xfs_log_item_batch_insert() 
     1460 * call. This saves a lot of needless list walking and is a net win, even 
     1461 * though it slightly increases that amount of AIL lock traffic to set it up 
     1462 * and tear it down. 
    14551463 */ 
    14561464void 
     
    14641472        struct xfs_log_item     *log_items[LOG_ITEM_BATCH_SIZE]; 
    14651473        struct xfs_log_vec      *lv; 
     1474        struct xfs_ail_cursor   cur; 
    14661475        int                     i = 0; 
     1476 
     1477        spin_lock(&ailp->xa_lock); 
     1478        xfs_trans_ail_cursor_last(ailp, &cur, commit_lsn); 
     1479        spin_unlock(&ailp->xa_lock); 
    14671480 
    14681481        /* unpin all the log items */ 
     
    14941507                         * Not a bulk update option due to unusual item_lsn. 
    14951508                         * Push into AIL immediately, rechecking the lsn once 
    1496                          * we have the ail lock. Then unpin the item. 
     1509                         * we have the ail lock. Then unpin the item. This does 
     1510                         * not affect the AIL cursor the bulk insert path is 
     1511                         * using. 
    14971512                         */ 
    14981513                        spin_lock(&ailp->xa_lock); 
     
    15081523                log_items[i++] = lv->lv_item; 
    15091524                if (i >= LOG_ITEM_BATCH_SIZE) { 
    1510                         xfs_log_item_batch_insert(ailp, log_items, 
     1525                        xfs_log_item_batch_insert(ailp, &cur, log_items, 
    15111526                                        LOG_ITEM_BATCH_SIZE, commit_lsn); 
    15121527                        i = 0; 
     
    15161531        /* make sure we insert the remainder! */ 
    15171532        if (i) 
    1518                 xfs_log_item_batch_insert(ailp, log_items, i, commit_lsn); 
     1533                xfs_log_item_batch_insert(ailp, &cur, log_items, i, commit_lsn); 
     1534 
     1535        spin_lock(&ailp->xa_lock); 
     1536        xfs_trans_ail_cursor_done(ailp, &cur); 
     1537        spin_unlock(&ailp->xa_lock); 
    15191538} 
    15201539 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_trans.h

    r17371 r17812  
    351351        xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t); 
    352352        void (*iop_push)(xfs_log_item_t *); 
    353         void (*iop_pushbuf)(xfs_log_item_t *); 
     353        bool (*iop_pushbuf)(xfs_log_item_t *); 
    354354        void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); 
    355355} xfs_item_ops_t; 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_trans_ail.c

    r17371 r17812  
    2929#include "xfs_error.h" 
    3030 
    31 struct workqueue_struct *xfs_ail_wq;    /* AIL workqueue */ 
    32  
    3331#ifdef DEBUG 
    3432/* 
     
    273271 
    274272/* 
    275  * Return the item in the AIL with the current lsn. 
    276  * Return the current tree generation number for use 
    277  * in calls to xfs_trans_next_ail(). 
     273 * Initialise the cursor to the first item in the AIL with the given @lsn. 
     274 * This searches the list from lowest LSN to highest. Pass a @lsn of zero 
     275 * to initialise the cursor to the first item in the AIL. 
    278276 */ 
    279277xfs_log_item_t * 
     
    301299 
    302300/* 
    303  * splice the log item list into the AIL at the given LSN. 
     301 * Initialise the cursor to the last item in the AIL with the given @lsn. 
     302 * This searches the list from highest LSN to lowest. If there is no item with 
     303 * the value of @lsn, then it sets the cursor to the last item with an LSN lower 
     304 * than @lsn. 
     305 */ 
     306static struct xfs_log_item * 
     307__xfs_trans_ail_cursor_last( 
     308        struct xfs_ail          *ailp, 
     309        xfs_lsn_t               lsn) 
     310{ 
     311        xfs_log_item_t          *lip; 
     312 
     313        list_for_each_entry_reverse(lip, &ailp->xa_ail, li_ail) { 
     314                if (XFS_LSN_CMP(lip->li_lsn, lsn) <= 0) 
     315                        return lip; 
     316        } 
     317        return NULL; 
     318} 
     319 
     320/* 
     321 * Initialise the cursor to the last item in the AIL with the given @lsn. 
     322 * This searches the list from highest LSN to lowest. 
     323 */ 
     324struct xfs_log_item * 
     325xfs_trans_ail_cursor_last( 
     326        struct xfs_ail          *ailp, 
     327        struct xfs_ail_cursor   *cur, 
     328        xfs_lsn_t               lsn) 
     329{ 
     330        xfs_trans_ail_cursor_init(ailp, cur); 
     331        cur->item = __xfs_trans_ail_cursor_last(ailp, lsn); 
     332        return cur->item; 
     333} 
     334 
     335/* 
     336 * splice the log item list into the AIL at the given LSN. We splice to the 
     337 * tail of the given LSN to maintain insert order for push traversals. The 
     338 * cursor is optional, allowing repeated updates to the same LSN to avoid 
     339 * repeated traversals. 
    304340 */ 
    305341static void 
    306342xfs_ail_splice( 
    307         struct xfs_ail  *ailp, 
    308         struct list_head *list, 
    309         xfs_lsn_t       lsn) 
    310 { 
    311         xfs_log_item_t  *next_lip; 
    312  
    313         /* If the list is empty, just insert the item.  */ 
    314         if (list_empty(&ailp->xa_ail)) { 
    315                 list_splice(list, &ailp->xa_ail); 
    316                 return; 
    317         } 
    318  
    319         list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) { 
    320                 if (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0) 
    321                         break; 
    322         } 
    323  
    324         ASSERT(&next_lip->li_ail == &ailp->xa_ail || 
    325                XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0); 
    326  
    327         list_splice_init(list, &next_lip->li_ail); 
     343        struct xfs_ail          *ailp, 
     344        struct xfs_ail_cursor   *cur, 
     345        struct list_head        *list, 
     346        xfs_lsn_t               lsn) 
     347{ 
     348        struct xfs_log_item     *lip = cur ? cur->item : NULL; 
     349        struct xfs_log_item     *next_lip; 
     350 
     351        /* 
     352         * Get a new cursor if we don't have a placeholder or the existing one 
     353         * has been invalidated. 
     354         */ 
     355        if (!lip || (__psint_t)lip & 1) { 
     356                lip = __xfs_trans_ail_cursor_last(ailp, lsn); 
     357 
     358                if (!lip) { 
     359                        /* The list is empty, so just splice and return.  */ 
     360                        if (cur) 
     361                                cur->item = NULL; 
     362                        list_splice(list, &ailp->xa_ail); 
     363                        return; 
     364                } 
     365        } 
     366 
     367        /* 
     368         * Our cursor points to the item we want to insert _after_, so we have 
     369         * to update the cursor to point to the end of the list we are splicing 
     370         * in so that it points to the correct location for the next splice. 
     371         * i.e. before the splice 
     372         * 
     373         *  lsn -> lsn -> lsn + x -> lsn + x ... 
     374         *          ^ 
     375         *          | cursor points here 
     376         * 
     377         * After the splice we have: 
     378         * 
     379         *  lsn -> lsn -> lsn -> lsn -> .... -> lsn -> lsn + x -> lsn + x ... 
     380         *          ^                            ^ 
     381         *          | cursor points here         | needs to move here 
     382         * 
     383         * So we set the cursor to the last item in the list to be spliced 
     384         * before we execute the splice, resulting in the cursor pointing to 
     385         * the correct item after the splice occurs. 
     386         */ 
     387        if (cur) { 
     388                next_lip = list_entry(list->prev, struct xfs_log_item, li_ail); 
     389                cur->item = next_lip; 
     390        } 
     391        list_splice(list, &lip->li_ail); 
    328392} 
    329393 
     
    341405} 
    342406 
    343 /* 
    344  * xfs_ail_worker does the work of pushing on the AIL. It will requeue itself 
    345  * to run at a later time if there is more work to do to complete the push. 
    346  */ 
    347 STATIC void 
    348 xfs_ail_worker( 
    349         struct work_struct      *work) 
    350 { 
    351         struct xfs_ail          *ailp = container_of(to_delayed_work(work), 
    352                                         struct xfs_ail, xa_work); 
     407static long 
     408xfsaild_push( 
     409        struct xfs_ail          *ailp) 
     410{ 
    353411        xfs_mount_t             *mp = ailp->xa_mount; 
    354412        struct xfs_ail_cursor   *cur = &ailp->xa_cursors; 
     
    413471                case XFS_ITEM_PUSHBUF: 
    414472                        XFS_STATS_INC(xs_push_ail_pushbuf); 
    415                         IOP_PUSHBUF(lip); 
    416                         ailp->xa_last_pushed_lsn = lsn; 
     473 
     474                        if (!IOP_PUSHBUF(lip)) { 
     475                                stuck++; 
     476                                flush_log = 1; 
     477                        } else { 
     478                                ailp->xa_last_pushed_lsn = lsn; 
     479                        } 
    417480                        push_xfsbufd = 1; 
    418481                        break; 
     
    426489                case XFS_ITEM_LOCKED: 
    427490                        XFS_STATS_INC(xs_push_ail_locked); 
    428                         ailp->xa_last_pushed_lsn = lsn; 
    429491                        stuck++; 
    430492                        break; 
     
    486548                /* We're past our target or empty, so idle */ 
    487549                ailp->xa_last_pushed_lsn = 0; 
    488  
    489                 /* 
    490                  * We clear the XFS_AIL_PUSHING_BIT first before checking 
    491                  * whether the target has changed. If the target has changed, 
    492                  * this pushes the requeue race directly onto the result of the 
    493                  * atomic test/set bit, so we are guaranteed that either the 
    494                  * the pusher that changed the target or ourselves will requeue 
    495                  * the work (but not both). 
    496                  */ 
    497                 clear_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags); 
    498                 smp_rmb(); 
    499                 if (XFS_LSN_CMP(ailp->xa_target, target) == 0 || 
    500                     test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags)) 
    501                         return; 
    502550 
    503551                tout = 50; 
     
    523571        } 
    524572 
    525         /* There is more to do, requeue us.  */ 
    526         queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, 
    527                                         msecs_to_jiffies(tout)); 
     573        return tout; 
     574} 
     575 
     576static int 
     577xfsaild( 
     578        void            *data) 
     579{ 
     580        struct xfs_ail  *ailp = data; 
     581        long            tout = 0;       /* milliseconds */ 
     582 
     583        while (!kthread_should_stop()) { 
     584                if (tout && tout <= 20) 
     585                        __set_current_state(TASK_KILLABLE); 
     586                else 
     587                        __set_current_state(TASK_INTERRUPTIBLE); 
     588                schedule_timeout(tout ? 
     589                                 msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT); 
     590 
     591                try_to_freeze(); 
     592 
     593                tout = xfsaild_push(ailp); 
     594        } 
     595 
     596        return 0; 
    528597} 
    529598 
     
    560629        smp_wmb(); 
    561630        xfs_trans_ail_copy_lsn(ailp, &ailp->xa_target, &threshold_lsn); 
    562         if (!test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags)) 
    563                 queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, 0); 
     631        smp_wmb(); 
     632 
     633        wake_up_process(ailp->xa_task); 
    564634} 
    565635 
     
    646716xfs_trans_ail_update_bulk( 
    647717        struct xfs_ail          *ailp, 
     718        struct xfs_ail_cursor   *cur, 
    648719        struct xfs_log_item     **log_items, 
    649720        int                     nr_items, 
     
    675746        } 
    676747 
    677         xfs_ail_splice(ailp, &tmp, lsn); 
     748        xfs_ail_splice(ailp, cur, &tmp, lsn); 
    678749 
    679750        if (!mlip_changed) { 
     
    795866        INIT_LIST_HEAD(&ailp->xa_ail); 
    796867        spin_lock_init(&ailp->xa_lock); 
    797         INIT_DELAYED_WORK(&ailp->xa_work, xfs_ail_worker); 
     868 
     869        ailp->xa_task = kthread_run(xfsaild, ailp, "xfsaild/%s", 
     870                        ailp->xa_mount->m_fsname); 
     871        if (IS_ERR(ailp->xa_task)) 
     872                goto out_free_ailp; 
     873 
    798874        mp->m_ail = ailp; 
    799875        return 0; 
     876 
     877out_free_ailp: 
     878        kmem_free(ailp); 
     879        return ENOMEM; 
    800880} 
    801881 
     
    806886        struct xfs_ail  *ailp = mp->m_ail; 
    807887 
    808         cancel_delayed_work_sync(&ailp->xa_work); 
     888        kthread_stop(ailp->xa_task); 
    809889        kmem_free(ailp); 
    810890} 
  • src/linux/laguna/linux-3.0/fs/xfs/xfs_trans_priv.h

    r17371 r17812  
    6565struct xfs_ail { 
    6666        struct xfs_mount        *xa_mount; 
     67        struct task_struct      *xa_task; 
    6768        struct list_head        xa_ail; 
    6869        xfs_lsn_t               xa_target; 
    6970        struct xfs_ail_cursor   xa_cursors; 
    7071        spinlock_t              xa_lock; 
    71         struct delayed_work     xa_work; 
    7272        xfs_lsn_t               xa_last_pushed_lsn; 
    73         unsigned long           xa_flags; 
    7473}; 
    75  
    76 #define XFS_AIL_PUSHING_BIT     0 
    7774 
    7875/* 
    7976 * From xfs_trans_ail.c 
    8077 */ 
    81  
    82 extern struct workqueue_struct  *xfs_ail_wq;    /* AIL workqueue */ 
    83  
    8478void    xfs_trans_ail_update_bulk(struct xfs_ail *ailp, 
     79                                struct xfs_ail_cursor *cur, 
    8580                                struct xfs_log_item **log_items, int nr_items, 
    8681                                xfs_lsn_t lsn) __releases(ailp->xa_lock); 
     
    9186        xfs_lsn_t               lsn) __releases(ailp->xa_lock) 
    9287{ 
    93         xfs_trans_ail_update_bulk(ailp, &lip, 1, lsn); 
     88        xfs_trans_ail_update_bulk(ailp, NULL, &lip, 1, lsn); 
    9489} 
    9590 
     
    112107                                        xfs_log_item_t *); 
    113108 
    114 struct xfs_log_item     *xfs_trans_ail_cursor_first(struct xfs_ail *ailp, 
     109struct xfs_log_item *   xfs_trans_ail_cursor_first(struct xfs_ail *ailp, 
    115110                                        struct xfs_ail_cursor *cur, 
    116111                                        xfs_lsn_t lsn); 
    117 struct xfs_log_item     *xfs_trans_ail_cursor_next(struct xfs_ail *ailp, 
     112struct xfs_log_item *   xfs_trans_ail_cursor_last(struct xfs_ail *ailp, 
     113                                        struct xfs_ail_cursor *cur, 
     114                                        xfs_lsn_t lsn); 
     115struct xfs_log_item *   xfs_trans_ail_cursor_next(struct xfs_ail *ailp, 
    118116                                        struct xfs_ail_cursor *cur); 
    119117void                    xfs_trans_ail_cursor_done(struct xfs_ail *ailp, 
  • src/linux/laguna/linux-3.0/kernel/posix-cpu-timers.c

    r17795 r17812  
    275275        unsigned long flags; 
    276276 
    277         spin_lock_irqsave(&cputimer->lock, flags); 
    278277        if (!cputimer->running) { 
    279                 cputimer->running = 1; 
    280278                /* 
    281279                 * The POSIX timer interface allows for absolute time expiry 
     
    285283                 */ 
    286284                thread_group_cputime(tsk, &sum); 
     285                spin_lock_irqsave(&cputimer->lock, flags); 
     286                cputimer->running = 1; 
    287287                update_gt_cputime(&cputimer->cputime, &sum); 
    288         } 
     288        } else 
     289                spin_lock_irqsave(&cputimer->lock, flags); 
    289290        *times = cputimer->cputime; 
    290291        spin_unlock_irqrestore(&cputimer->lock, flags); 
  • src/linux/laguna/linux-3.0/kernel/sys.c

    r17540 r17812  
    11361136{ 
    11371137        int ret = 0; 
    1138         char buf[len]; 
     1138        char buf[65]; 
    11391139 
    11401140        if (current->personality & UNAME26) { 
  • src/linux/laguna/linux-3.0/mm/migrate.c

    r17371 r17812  
    121121                ptep = pte_offset_map(pmd, addr); 
    122122 
    123                 if (!is_swap_pte(*ptep)) { 
    124                         pte_unmap(ptep); 
    125                         goto out; 
    126                 } 
     123                /* 
     124                 * Peek to check is_swap_pte() before taking ptlock?  No, we 
     125                 * can race mremap's move_ptes(), which skips anon_vma lock. 
     126                 */ 
    127127 
    128128                ptl = pte_lockptr(mm, pmd); 
  • src/linux/laguna/linux-3.0/net/x25/af_x25.c

    r17371 r17812  
    296296                         * call user data vs this sockets call user data 
    297297                         */ 
    298                         if(skb->len > 0 && x25_sk(s)->cudmatchlength > 0) { 
     298                        if (x25_sk(s)->cudmatchlength > 0 && 
     299                                skb->len >= x25_sk(s)->cudmatchlength) { 
    299300                                if((memcmp(x25_sk(s)->calluserdata.cuddata, 
    300301                                        skb->data, 
  • src/linux/laguna/linux-3.0/sound/pci/hda/hda_intel.c

    r17371 r17812  
    23532353        SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), 
    23542354        SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), 
     2355        SND_PCI_QUIRK(0x1028, 0x02c6, "Dell Inspiron 1010", POS_FIX_LPIB), 
    23552356        SND_PCI_QUIRK(0x1028, 0x0470, "Dell Inspiron 1120", POS_FIX_LPIB), 
    23562357        SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), 
  • src/linux/laguna/linux-3.0/sound/pci/hda/patch_conexant.c

    r17371 r17812  
    30983098        SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), 
    30993099        SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), 
     3100        SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520 & W520", CXT5066_AUTO), 
    31003101        SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD), 
    31013102        SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD), 
Note: See TracChangeset for help on using the changeset viewer.