mirror of https://gitee.com/openkylin/linux.git
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cciss: remove overlapping PCI IDs block: cciss: fix information leak to userland drivers/block/aoe/aoeblk.c: ratelimit a warning printk drivers/block/z2ram.c: correct printing of sector_t aoe: don't use flush_scheduled_work() drivers/block/drbd/drbd_main.c: fix error path loop: Properly clear sysfs in autoclear mode
This commit is contained in:
commit
ed2e5581d2
|
@ -4,12 +4,14 @@
|
|||
* block device routines
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/genhd.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/mutex.h>
|
||||
|
@ -207,7 +209,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
|
|||
spin_lock_irqsave(&d->lock, flags);
|
||||
|
||||
if ((d->flags & DEVFL_UP) == 0) {
|
||||
printk(KERN_INFO "aoe: device %ld.%d is not up\n",
|
||||
pr_info_ratelimited("aoe: device %ld.%d is not up\n",
|
||||
d->aoemajor, d->aoeminor);
|
||||
spin_unlock_irqrestore(&d->lock, flags);
|
||||
mempool_free(buf, d->bufpool);
|
||||
|
|
|
@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d)
|
|||
{
|
||||
struct aoetgt **t, **e;
|
||||
|
||||
cancel_work_sync(&d->work);
|
||||
if (d->gd) {
|
||||
aoedisk_rm_sysfs(d);
|
||||
del_gendisk(d->gd);
|
||||
|
@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, size_t cnt)
|
|||
all = !strncmp(buf, "all", 3);
|
||||
}
|
||||
|
||||
flush_scheduled_work();
|
||||
spin_lock_irqsave(&devlist_lock, flags);
|
||||
dd = &devlist;
|
||||
while ((d = *dd)) {
|
||||
|
@ -257,8 +257,6 @@ aoedev_exit(void)
|
|||
struct aoedev *d;
|
||||
ulong flags;
|
||||
|
||||
flush_scheduled_work();
|
||||
|
||||
while ((d = devlist)) {
|
||||
devlist = d->next;
|
||||
|
||||
|
|
|
@ -66,11 +66,6 @@ MODULE_VERSION("3.6.26");
|
|||
MODULE_LICENSE("GPL");
|
||||
|
||||
static DEFINE_MUTEX(cciss_mutex);
|
||||
static int cciss_allow_hpsa;
|
||||
module_param(cciss_allow_hpsa, int, S_IRUGO|S_IWUSR);
|
||||
MODULE_PARM_DESC(cciss_allow_hpsa,
|
||||
"Prevent cciss driver from accessing hardware known to be "
|
||||
" supported by the hpsa driver");
|
||||
|
||||
#include "cciss_cmd.h"
|
||||
#include "cciss.h"
|
||||
|
@ -98,19 +93,6 @@ static const struct pci_device_id cciss_pci_device_id[] = {
|
|||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3241},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3243},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x324A},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x324B},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3350},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3351},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3352},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3353},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3354},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3355},
|
||||
{0,}
|
||||
};
|
||||
|
||||
|
@ -138,24 +120,9 @@ static struct board_type products[] = {
|
|||
{0x3214103C, "Smart Array E200i", &SA5_access},
|
||||
{0x3215103C, "Smart Array E200i", &SA5_access},
|
||||
{0x3237103C, "Smart Array E500", &SA5_access},
|
||||
/* controllers below this line are also supported by the hpsa driver. */
|
||||
#define HPSA_BOUNDARY 0x3223103C
|
||||
{0x3223103C, "Smart Array P800", &SA5_access},
|
||||
{0x3234103C, "Smart Array P400", &SA5_access},
|
||||
{0x323D103C, "Smart Array P700m", &SA5_access},
|
||||
{0x3241103C, "Smart Array P212", &SA5_access},
|
||||
{0x3243103C, "Smart Array P410", &SA5_access},
|
||||
{0x3245103C, "Smart Array P410i", &SA5_access},
|
||||
{0x3247103C, "Smart Array P411", &SA5_access},
|
||||
{0x3249103C, "Smart Array P812", &SA5_access},
|
||||
{0x324A103C, "Smart Array P712m", &SA5_access},
|
||||
{0x324B103C, "Smart Array P711m", &SA5_access},
|
||||
{0x3350103C, "Smart Array", &SA5_access},
|
||||
{0x3351103C, "Smart Array", &SA5_access},
|
||||
{0x3352103C, "Smart Array", &SA5_access},
|
||||
{0x3353103C, "Smart Array", &SA5_access},
|
||||
{0x3354103C, "Smart Array", &SA5_access},
|
||||
{0x3355103C, "Smart Array", &SA5_access},
|
||||
};
|
||||
|
||||
/* How long to wait (in milliseconds) for board to go into simple mode */
|
||||
|
@ -1184,6 +1151,7 @@ static int cciss_ioctl32_big_passthru(struct block_device *bdev, fmode_t mode,
|
|||
int err;
|
||||
u32 cp;
|
||||
|
||||
memset(&arg64, 0, sizeof(arg64));
|
||||
err = 0;
|
||||
err |=
|
||||
copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
|
||||
|
@ -3970,9 +3938,6 @@ static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
|
|||
subsystem_vendor_id;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(products); i++) {
|
||||
/* Stand aside for hpsa driver on request */
|
||||
if (cciss_allow_hpsa && products[i].board_id == HPSA_BOUNDARY)
|
||||
return -ENODEV;
|
||||
if (*board_id == products[i].board_id)
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -2982,7 +2982,7 @@ static int drbd_create_mempools(void)
|
|||
|
||||
drbd_ee_mempool = mempool_create(number,
|
||||
mempool_alloc_slab, mempool_free_slab, drbd_ee_cache);
|
||||
if (drbd_request_mempool == NULL)
|
||||
if (drbd_ee_mempool == NULL)
|
||||
goto Enomem;
|
||||
|
||||
/* drbd's page pool */
|
||||
|
|
|
@ -1049,9 +1049,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
|
|||
if (bdev)
|
||||
invalidate_bdev(bdev);
|
||||
set_capacity(lo->lo_disk, 0);
|
||||
loop_sysfs_exit(lo);
|
||||
if (bdev) {
|
||||
bd_set_size(bdev, 0);
|
||||
loop_sysfs_exit(lo);
|
||||
/* let user-space know about this change */
|
||||
kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE);
|
||||
}
|
||||
|
|
|
@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q)
|
|||
int err = 0;
|
||||
|
||||
if (start + len > z2ram_size) {
|
||||
printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
|
||||
blk_rq_pos(req), blk_rq_cur_sectors(req));
|
||||
pr_err(DEVICE_NAME ": bad access: block=%llu, "
|
||||
"count=%u\n",
|
||||
(unsigned long long)blk_rq_pos(req),
|
||||
blk_rq_cur_sectors(req));
|
||||
err = -EIO;
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue