mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: drivers/char/ftape/lowlevel/fdc-io.c: Correct a comment Kconfig help: MTD_JEDECPROBE already supports Intel Remove ugly debugging stuff do_mounts.c: Minor ROOT_DEV comment cleanup BUG_ON() Conversion in drivers/s390/block/dasd_devmap.c BUG_ON() Conversion in mm/mempool.c BUG_ON() Conversion in mm/memory.c BUG_ON() Conversion in kernel/fork.c BUG_ON() Conversion in ipc/sem.c BUG_ON() Conversion in fs/ext2/ BUG_ON() Conversion in fs/hfs/ BUG_ON() Conversion in fs/dcache.c BUG_ON() Conversion in fs/buffer.c BUG_ON() Conversion in input/serio/hp_sdc_mlc.c BUG_ON() Conversion in md/dm-table.c BUG_ON() Conversion in md/dm-path-selector.c BUG_ON() Conversion in drivers/isdn BUG_ON() Conversion in drivers/char BUG_ON() Conversion in drivers/mtd/
This commit is contained in:
commit
9ae21d1bb3
26 changed files with 50 additions and 98 deletions
|
@ -486,8 +486,7 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
|
||||||
} /* End channel is open more than once */
|
} /* End channel is open more than once */
|
||||||
|
|
||||||
/* Port open only once go ahead with shutdown & reset */
|
/* Port open only once go ahead with shutdown & reset */
|
||||||
if (ch->count < 0)
|
BUG_ON(ch->count < 0);
|
||||||
BUG();
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------
|
/* ---------------------------------------------------------------
|
||||||
Let the rest of the driver know the channel is being closed.
|
Let the rest of the driver know the channel is being closed.
|
||||||
|
|
|
@ -607,7 +607,7 @@ void fdc_reset(void)
|
||||||
|
|
||||||
fdc_mode = fdc_idle;
|
fdc_mode = fdc_idle;
|
||||||
|
|
||||||
/* maybe the cli()/sti() pair is not necessary, BUT:
|
/* maybe the spin_lock_irq* pair is not necessary, BUT:
|
||||||
* the following line MUST be here. Otherwise fdc_interrupt_wait()
|
* the following line MUST be here. Otherwise fdc_interrupt_wait()
|
||||||
* won't wait. Note that fdc_reset() is called from
|
* won't wait. Note that fdc_reset() is called from
|
||||||
* ftape_dumb_stop() when the fdc is busy transferring data. In this
|
* ftape_dumb_stop() when the fdc is busy transferring data. In this
|
||||||
|
|
|
@ -543,14 +543,12 @@ void tty_ldisc_put(int disc)
|
||||||
struct tty_ldisc *ld;
|
struct tty_ldisc *ld;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (disc < N_TTY || disc >= NR_LDISCS)
|
BUG_ON(disc < N_TTY || disc >= NR_LDISCS);
|
||||||
BUG();
|
|
||||||
|
|
||||||
spin_lock_irqsave(&tty_ldisc_lock, flags);
|
spin_lock_irqsave(&tty_ldisc_lock, flags);
|
||||||
ld = &tty_ldiscs[disc];
|
ld = &tty_ldiscs[disc];
|
||||||
if(ld->refcount == 0)
|
BUG_ON(ld->refcount == 0);
|
||||||
BUG();
|
ld->refcount--;
|
||||||
ld->refcount --;
|
|
||||||
module_put(ld->owner);
|
module_put(ld->owner);
|
||||||
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
|
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
|
||||||
}
|
}
|
||||||
|
@ -645,8 +643,7 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if(ld == NULL)
|
BUG_ON(ld == NULL);
|
||||||
BUG();
|
|
||||||
|
|
||||||
spin_lock_irqsave(&tty_ldisc_lock, flags);
|
spin_lock_irqsave(&tty_ldisc_lock, flags);
|
||||||
if(ld->refcount == 0)
|
if(ld->refcount == 0)
|
||||||
|
|
|
@ -270,9 +270,10 @@ static void hp_sdc_mlc_out (hil_mlc *mlc) {
|
||||||
|
|
||||||
do_control:
|
do_control:
|
||||||
priv->emtestmode = mlc->opacket & HIL_CTRL_TEST;
|
priv->emtestmode = mlc->opacket & HIL_CTRL_TEST;
|
||||||
if ((mlc->opacket & (HIL_CTRL_APE | HIL_CTRL_IPF)) == HIL_CTRL_APE) {
|
|
||||||
BUG(); /* we cannot emulate this, it should not be used. */
|
/* we cannot emulate this, it should not be used. */
|
||||||
}
|
BUG_ON((mlc->opacket & (HIL_CTRL_APE | HIL_CTRL_IPF)) == HIL_CTRL_APE);
|
||||||
|
|
||||||
if ((mlc->opacket & HIL_CTRL_ONLY) == HIL_CTRL_ONLY) goto control_only;
|
if ((mlc->opacket & HIL_CTRL_ONLY) == HIL_CTRL_ONLY) goto control_only;
|
||||||
if (mlc->opacket & HIL_CTRL_APE) {
|
if (mlc->opacket & HIL_CTRL_APE) {
|
||||||
BUG(); /* Should not send command/data after engaging APE */
|
BUG(); /* Should not send command/data after engaging APE */
|
||||||
|
|
|
@ -387,8 +387,7 @@ static void hdlc_fill_fifo(struct fritz_bcs *bcs)
|
||||||
|
|
||||||
DBG(0x40, "hdlc_fill_fifo");
|
DBG(0x40, "hdlc_fill_fifo");
|
||||||
|
|
||||||
if (skb->len == 0)
|
BUG_ON(skb->len == 0);
|
||||||
BUG();
|
|
||||||
|
|
||||||
bcs->ctrl.sr.cmd &= ~HDLC_CMD_XME;
|
bcs->ctrl.sr.cmd &= ~HDLC_CMD_XME;
|
||||||
if (bcs->tx_skb->len > bcs->fifo_size) {
|
if (bcs->tx_skb->len > bcs->fifo_size) {
|
||||||
|
@ -630,9 +629,7 @@ static void fritz_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
|
||||||
|
|
||||||
switch (pr) {
|
switch (pr) {
|
||||||
case PH_DATA | REQUEST:
|
case PH_DATA | REQUEST:
|
||||||
if (bcs->tx_skb)
|
BUG_ON(bcs->tx_skb);
|
||||||
BUG();
|
|
||||||
|
|
||||||
bcs->tx_skb = skb;
|
bcs->tx_skb = skb;
|
||||||
DBG_SKB(1, skb);
|
DBG_SKB(1, skb);
|
||||||
hdlc_fill_fifo(bcs);
|
hdlc_fill_fifo(bcs);
|
||||||
|
|
|
@ -476,12 +476,10 @@ static void isac_fill_fifo(struct isac *isac)
|
||||||
unsigned char cmd;
|
unsigned char cmd;
|
||||||
u_char *ptr;
|
u_char *ptr;
|
||||||
|
|
||||||
if (!isac->tx_skb)
|
BUG_ON(!isac->tx_skb);
|
||||||
BUG();
|
|
||||||
|
|
||||||
count = isac->tx_skb->len;
|
count = isac->tx_skb->len;
|
||||||
if (count <= 0)
|
BUG_ON(count <= 0);
|
||||||
BUG();
|
|
||||||
|
|
||||||
DBG(DBG_IRQ, "count %d", count);
|
DBG(DBG_IRQ, "count %d", count);
|
||||||
|
|
||||||
|
@ -859,8 +857,7 @@ void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg)
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isac->tx_skb)
|
BUG_ON(isac->tx_skb);
|
||||||
BUG();
|
|
||||||
|
|
||||||
isac->tx_skb = skb;
|
isac->tx_skb = skb;
|
||||||
isac_fill_fifo(isac);
|
isac_fill_fifo(isac);
|
||||||
|
|
|
@ -356,9 +356,7 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
|
||||||
|
|
||||||
switch (pr) {
|
switch (pr) {
|
||||||
case PH_DATA | REQUEST:
|
case PH_DATA | REQUEST:
|
||||||
if (bcs->b_out.tx_skb)
|
BUG_ON(bcs->b_out.tx_skb);
|
||||||
BUG();
|
|
||||||
|
|
||||||
bcs->b_out.tx_skb = skb;
|
bcs->b_out.tx_skb = skb;
|
||||||
break;
|
break;
|
||||||
case PH_ACTIVATE | REQUEST:
|
case PH_ACTIVATE | REQUEST:
|
||||||
|
|
|
@ -596,9 +596,7 @@ void st5481_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg)
|
||||||
break;
|
break;
|
||||||
case PH_DATA | REQUEST:
|
case PH_DATA | REQUEST:
|
||||||
DBG(2, "PH_DATA REQUEST len %d", skb->len);
|
DBG(2, "PH_DATA REQUEST len %d", skb->len);
|
||||||
if (adapter->d_out.tx_skb)
|
BUG_ON(adapter->d_out.tx_skb);
|
||||||
BUG();
|
|
||||||
|
|
||||||
adapter->d_out.tx_skb = skb;
|
adapter->d_out.tx_skb = skb;
|
||||||
FsmEvent(&adapter->d_out.fsm, EV_DOUT_START_XMIT, NULL);
|
FsmEvent(&adapter->d_out.fsm, EV_DOUT_START_XMIT, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -974,8 +974,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
|
||||||
int slot;
|
int slot;
|
||||||
int proto;
|
int proto;
|
||||||
|
|
||||||
if (net_dev->local->master)
|
BUG_ON(net_dev->local->master); // we're called with the master device always
|
||||||
BUG(); // we're called with the master device always
|
|
||||||
|
|
||||||
slot = lp->ppp_slot;
|
slot = lp->ppp_slot;
|
||||||
if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
|
if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
|
||||||
|
@ -2527,8 +2526,7 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc
|
||||||
printk(KERN_DEBUG "ippp: no decompressor defined!\n");
|
printk(KERN_DEBUG "ippp: no decompressor defined!\n");
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
if (!stat) // if we have a compressor, stat has been set as well
|
BUG_ON(!stat); // if we have a compressor, stat has been set as well
|
||||||
BUG();
|
|
||||||
|
|
||||||
if((master && *proto == PPP_COMP) || (!master && *proto == PPP_COMPFRAG) ) {
|
if((master && *proto == PPP_COMP) || (!master && *proto == PPP_COMPFRAG) ) {
|
||||||
// compressed packets are compressed by their protocol type
|
// compressed packets are compressed by their protocol type
|
||||||
|
|
|
@ -86,8 +86,7 @@ void dm_put_path_selector(struct path_selector_type *pst)
|
||||||
if (--psi->use == 0)
|
if (--psi->use == 0)
|
||||||
module_put(psi->pst.module);
|
module_put(psi->pst.module);
|
||||||
|
|
||||||
if (psi->use < 0)
|
BUG_ON(psi->use < 0);
|
||||||
BUG();
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
up_read(&_ps_lock);
|
up_read(&_ps_lock);
|
||||||
|
|
|
@ -352,8 +352,7 @@ static int open_dev(struct dm_dev *d, dev_t dev)
|
||||||
|
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (d->bdev)
|
BUG_ON(d->bdev);
|
||||||
BUG();
|
|
||||||
|
|
||||||
bdev = open_by_devnum(dev, d->mode);
|
bdev = open_by_devnum(dev, d->mode);
|
||||||
if (IS_ERR(bdev))
|
if (IS_ERR(bdev))
|
||||||
|
@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti,
|
||||||
struct dm_dev *dd;
|
struct dm_dev *dd;
|
||||||
unsigned int major, minor;
|
unsigned int major, minor;
|
||||||
|
|
||||||
if (!t)
|
BUG_ON(!t);
|
||||||
BUG();
|
|
||||||
|
|
||||||
if (sscanf(path, "%u:%u", &major, &minor) == 2) {
|
if (sscanf(path, "%u:%u", &major, &minor) == 2) {
|
||||||
/* Extract the major/minor numbers */
|
/* Extract the major/minor numbers */
|
||||||
|
|
|
@ -25,9 +25,8 @@ config MTD_JEDECPROBE
|
||||||
compatible with the Common Flash Interface, but will use the common
|
compatible with the Common Flash Interface, but will use the common
|
||||||
CFI-targetted flash drivers for any chips which are identified which
|
CFI-targetted flash drivers for any chips which are identified which
|
||||||
are in fact compatible in all but the probe method. This actually
|
are in fact compatible in all but the probe method. This actually
|
||||||
covers most AMD/Fujitsu-compatible chips, and will shortly cover also
|
covers most AMD/Fujitsu-compatible chips and also non-CFI
|
||||||
non-CFI Intel chips (that code is in MTD CVS and should shortly be sent
|
Intel chips.
|
||||||
for inclusion in Linus' tree)
|
|
||||||
|
|
||||||
config MTD_GEN_PROBE
|
config MTD_GEN_PROBE
|
||||||
tristate
|
tristate
|
||||||
|
|
|
@ -218,8 +218,8 @@ static void dnp_set_vpp(struct map_info *not_used, int on)
|
||||||
{
|
{
|
||||||
if(--vpp_counter == 0)
|
if(--vpp_counter == 0)
|
||||||
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
|
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
|
||||||
else if(vpp_counter < 0)
|
else
|
||||||
BUG();
|
BUG_ON(vpp_counter < 0);
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&dnpc_spin);
|
spin_unlock_irq(&dnpc_spin);
|
||||||
}
|
}
|
||||||
|
@ -240,8 +240,8 @@ static void adnp_set_vpp(struct map_info *not_used, int on)
|
||||||
{
|
{
|
||||||
if(--vpp_counter == 0)
|
if(--vpp_counter == 0)
|
||||||
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
|
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
|
||||||
else if(vpp_counter < 0)
|
else
|
||||||
BUG();
|
BUG_ON(vpp_counter < 0);
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&dnpc_spin);
|
spin_unlock_irq(&dnpc_spin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -450,8 +450,7 @@ int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr)
|
||||||
|
|
||||||
kfree(tr->blkcore_priv);
|
kfree(tr->blkcore_priv);
|
||||||
|
|
||||||
if (!list_empty(&tr->devs))
|
BUG_ON(!list_empty(&tr->devs));
|
||||||
BUG();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -477,8 +477,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* must never happen since size limit has been verified above */
|
/* must never happen since size limit has been verified above */
|
||||||
if (i >= concat->num_subdev)
|
BUG_ON(i >= concat->num_subdev);
|
||||||
BUG();
|
|
||||||
|
|
||||||
/* now do the erase: */
|
/* now do the erase: */
|
||||||
err = 0;
|
err = 0;
|
||||||
|
@ -500,8 +499,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
|
||||||
if ((err = concat_dev_erase(subdev, erase))) {
|
if ((err = concat_dev_erase(subdev, erase))) {
|
||||||
/* sanity check: should never happen since
|
/* sanity check: should never happen since
|
||||||
* block alignment has been checked above */
|
* block alignment has been checked above */
|
||||||
if (err == -EINVAL)
|
BUG_ON(err == -EINVAL);
|
||||||
BUG();
|
|
||||||
if (erase->fail_addr != 0xffffffff)
|
if (erase->fail_addr != 0xffffffff)
|
||||||
instr->fail_addr = erase->fail_addr + offset;
|
instr->fail_addr = erase->fail_addr + offset;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -437,8 +437,7 @@ dasd_forget_ranges(void)
|
||||||
spin_lock(&dasd_devmap_lock);
|
spin_lock(&dasd_devmap_lock);
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) {
|
list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) {
|
||||||
if (devmap->device != NULL)
|
BUG_ON(devmap->device != NULL);
|
||||||
BUG();
|
|
||||||
list_del(&devmap->list);
|
list_del(&devmap->list);
|
||||||
kfree(devmap);
|
kfree(devmap);
|
||||||
}
|
}
|
||||||
|
@ -547,8 +546,7 @@ dasd_delete_device(struct dasd_device *device)
|
||||||
|
|
||||||
/* First remove device pointer from devmap. */
|
/* First remove device pointer from devmap. */
|
||||||
devmap = dasd_find_busid(device->cdev->dev.bus_id);
|
devmap = dasd_find_busid(device->cdev->dev.bus_id);
|
||||||
if (IS_ERR(devmap))
|
BUG_ON(IS_ERR(devmap));
|
||||||
BUG();
|
|
||||||
spin_lock(&dasd_devmap_lock);
|
spin_lock(&dasd_devmap_lock);
|
||||||
if (devmap->device != device) {
|
if (devmap->device != device) {
|
||||||
spin_unlock(&dasd_devmap_lock);
|
spin_unlock(&dasd_devmap_lock);
|
||||||
|
|
|
@ -798,8 +798,7 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode)
|
||||||
if (!mapping->assoc_mapping) {
|
if (!mapping->assoc_mapping) {
|
||||||
mapping->assoc_mapping = buffer_mapping;
|
mapping->assoc_mapping = buffer_mapping;
|
||||||
} else {
|
} else {
|
||||||
if (mapping->assoc_mapping != buffer_mapping)
|
BUG_ON(mapping->assoc_mapping != buffer_mapping);
|
||||||
BUG();
|
|
||||||
}
|
}
|
||||||
if (list_empty(&bh->b_assoc_buffers)) {
|
if (list_empty(&bh->b_assoc_buffers)) {
|
||||||
spin_lock(&buffer_mapping->private_lock);
|
spin_lock(&buffer_mapping->private_lock);
|
||||||
|
@ -1116,8 +1115,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
|
||||||
if (!page)
|
if (!page)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!PageLocked(page))
|
BUG_ON(!PageLocked(page));
|
||||||
BUG();
|
|
||||||
|
|
||||||
if (page_has_buffers(page)) {
|
if (page_has_buffers(page)) {
|
||||||
bh = page_buffers(page);
|
bh = page_buffers(page);
|
||||||
|
@ -1524,8 +1522,7 @@ void set_bh_page(struct buffer_head *bh,
|
||||||
struct page *page, unsigned long offset)
|
struct page *page, unsigned long offset)
|
||||||
{
|
{
|
||||||
bh->b_page = page;
|
bh->b_page = page;
|
||||||
if (offset >= PAGE_SIZE)
|
BUG_ON(offset >= PAGE_SIZE);
|
||||||
BUG();
|
|
||||||
if (PageHighMem(page))
|
if (PageHighMem(page))
|
||||||
/*
|
/*
|
||||||
* This catches illegal uses and preserves the offset:
|
* This catches illegal uses and preserves the offset:
|
||||||
|
|
11
fs/dcache.c
11
fs/dcache.c
|
@ -34,7 +34,6 @@
|
||||||
#include <linux/swap.h>
|
#include <linux/swap.h>
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
|
|
||||||
/* #define DCACHE_DEBUG 1 */
|
|
||||||
|
|
||||||
int sysctl_vfs_cache_pressure __read_mostly = 100;
|
int sysctl_vfs_cache_pressure __read_mostly = 100;
|
||||||
EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
|
EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
|
||||||
|
@ -603,10 +602,6 @@ resume:
|
||||||
*/
|
*/
|
||||||
if (!list_empty(&dentry->d_subdirs)) {
|
if (!list_empty(&dentry->d_subdirs)) {
|
||||||
this_parent = dentry;
|
this_parent = dentry;
|
||||||
#ifdef DCACHE_DEBUG
|
|
||||||
printk(KERN_DEBUG "select_parent: descending to %s/%s, found=%d\n",
|
|
||||||
dentry->d_parent->d_name.name, dentry->d_name.name, found);
|
|
||||||
#endif
|
|
||||||
goto repeat;
|
goto repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -616,10 +611,6 @@ dentry->d_parent->d_name.name, dentry->d_name.name, found);
|
||||||
if (this_parent != parent) {
|
if (this_parent != parent) {
|
||||||
next = this_parent->d_u.d_child.next;
|
next = this_parent->d_u.d_child.next;
|
||||||
this_parent = this_parent->d_parent;
|
this_parent = this_parent->d_parent;
|
||||||
#ifdef DCACHE_DEBUG
|
|
||||||
printk(KERN_DEBUG "select_parent: ascending to %s/%s, found=%d\n",
|
|
||||||
this_parent->d_parent->d_name.name, this_parent->d_name.name, found);
|
|
||||||
#endif
|
|
||||||
goto resume;
|
goto resume;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
|
@ -798,7 +789,7 @@ struct dentry *d_alloc_name(struct dentry *parent, const char *name)
|
||||||
|
|
||||||
void d_instantiate(struct dentry *entry, struct inode * inode)
|
void d_instantiate(struct dentry *entry, struct inode * inode)
|
||||||
{
|
{
|
||||||
if (!list_empty(&entry->d_alias)) BUG();
|
BUG_ON(!list_empty(&entry->d_alias));
|
||||||
spin_lock(&dcache_lock);
|
spin_lock(&dcache_lock);
|
||||||
if (inode)
|
if (inode)
|
||||||
list_add(&entry->d_alias, &inode->i_dentry);
|
list_add(&entry->d_alias, &inode->i_dentry);
|
||||||
|
|
|
@ -416,8 +416,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
|
||||||
|
|
||||||
lock_page(page);
|
lock_page(page);
|
||||||
err = page->mapping->a_ops->prepare_write(NULL, page, from, to);
|
err = page->mapping->a_ops->prepare_write(NULL, page, from, to);
|
||||||
if (err)
|
BUG_ON(err);
|
||||||
BUG();
|
|
||||||
de->inode = cpu_to_le32(inode->i_ino);
|
de->inode = cpu_to_le32(inode->i_ino);
|
||||||
ext2_set_de_type (de, inode);
|
ext2_set_de_type (de, inode);
|
||||||
err = ext2_commit_chunk(page, from, to);
|
err = ext2_commit_chunk(page, from, to);
|
||||||
|
@ -554,8 +553,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page )
|
||||||
from = (char*)pde - (char*)page_address(page);
|
from = (char*)pde - (char*)page_address(page);
|
||||||
lock_page(page);
|
lock_page(page);
|
||||||
err = mapping->a_ops->prepare_write(NULL, page, from, to);
|
err = mapping->a_ops->prepare_write(NULL, page, from, to);
|
||||||
if (err)
|
BUG_ON(err);
|
||||||
BUG();
|
|
||||||
if (pde)
|
if (pde)
|
||||||
pde->rec_len = cpu_to_le16(to-from);
|
pde->rec_len = cpu_to_le16(to-from);
|
||||||
dir->inode = 0;
|
dir->inode = 0;
|
||||||
|
|
|
@ -306,8 +306,7 @@ void hfs_bnode_unhash(struct hfs_bnode *node)
|
||||||
for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
|
for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
|
||||||
*p && *p != node; p = &(*p)->next_hash)
|
*p && *p != node; p = &(*p)->next_hash)
|
||||||
;
|
;
|
||||||
if (!*p)
|
BUG_ON(!*p);
|
||||||
BUG();
|
|
||||||
*p = node->next_hash;
|
*p = node->next_hash;
|
||||||
node->tree->node_hash_cnt--;
|
node->tree->node_hash_cnt--;
|
||||||
}
|
}
|
||||||
|
@ -415,8 +414,7 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num)
|
||||||
spin_lock(&tree->hash_lock);
|
spin_lock(&tree->hash_lock);
|
||||||
node = hfs_bnode_findhash(tree, num);
|
node = hfs_bnode_findhash(tree, num);
|
||||||
spin_unlock(&tree->hash_lock);
|
spin_unlock(&tree->hash_lock);
|
||||||
if (node)
|
BUG_ON(node);
|
||||||
BUG();
|
|
||||||
node = __hfs_bnode_create(tree, num);
|
node = __hfs_bnode_create(tree, num);
|
||||||
if (!node)
|
if (!node)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
@ -459,8 +457,7 @@ void hfs_bnode_put(struct hfs_bnode *node)
|
||||||
|
|
||||||
dprint(DBG_BNODE_REFS, "put_node(%d:%d): %d\n",
|
dprint(DBG_BNODE_REFS, "put_node(%d:%d): %d\n",
|
||||||
node->tree->cnid, node->this, atomic_read(&node->refcnt));
|
node->tree->cnid, node->this, atomic_read(&node->refcnt));
|
||||||
if (!atomic_read(&node->refcnt))
|
BUG_ON(!atomic_read(&node->refcnt));
|
||||||
BUG();
|
|
||||||
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
|
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < tree->pages_per_bnode; i++) {
|
for (i = 0; i < tree->pages_per_bnode; i++) {
|
||||||
|
|
|
@ -36,8 +36,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
|
||||||
tree->inode = iget_locked(sb, id);
|
tree->inode = iget_locked(sb, id);
|
||||||
if (!tree->inode)
|
if (!tree->inode)
|
||||||
goto free_tree;
|
goto free_tree;
|
||||||
if (!(tree->inode->i_state & I_NEW))
|
BUG_ON(!(tree->inode->i_state & I_NEW));
|
||||||
BUG();
|
|
||||||
{
|
{
|
||||||
struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
|
struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
|
||||||
HFS_I(tree->inode)->flags = 0;
|
HFS_I(tree->inode)->flags = 0;
|
||||||
|
|
|
@ -23,7 +23,6 @@ int root_mountflags = MS_RDONLY | MS_SILENT;
|
||||||
char * __initdata root_device_name;
|
char * __initdata root_device_name;
|
||||||
static char __initdata saved_root_name[64];
|
static char __initdata saved_root_name[64];
|
||||||
|
|
||||||
/* this is initialized in init/main.c */
|
|
||||||
dev_t ROOT_DEV;
|
dev_t ROOT_DEV;
|
||||||
|
|
||||||
static int __init load_ramdisk(char *str)
|
static int __init load_ramdisk(char *str)
|
||||||
|
|
|
@ -229,8 +229,7 @@ asmlinkage long sys_semget (key_t key, int nsems, int semflg)
|
||||||
err = -EEXIST;
|
err = -EEXIST;
|
||||||
} else {
|
} else {
|
||||||
sma = sem_lock(id);
|
sma = sem_lock(id);
|
||||||
if(sma==NULL)
|
BUG_ON(sma==NULL);
|
||||||
BUG();
|
|
||||||
if (nsems > sma->sem_nsems)
|
if (nsems > sma->sem_nsems)
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
else if (ipcperms(&sma->sem_perm, semflg))
|
else if (ipcperms(&sma->sem_perm, semflg))
|
||||||
|
@ -1183,8 +1182,7 @@ retry_undos:
|
||||||
|
|
||||||
sma = sem_lock(semid);
|
sma = sem_lock(semid);
|
||||||
if(sma==NULL) {
|
if(sma==NULL) {
|
||||||
if(queue.prev != NULL)
|
BUG_ON(queue.prev != NULL);
|
||||||
BUG();
|
|
||||||
error = -EIDRM;
|
error = -EIDRM;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
|
@ -769,8 +769,7 @@ int unshare_files(void)
|
||||||
struct files_struct *files = current->files;
|
struct files_struct *files = current->files;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if(!files)
|
BUG_ON(!files);
|
||||||
BUG();
|
|
||||||
|
|
||||||
/* This can race but the race causes us to copy when we don't
|
/* This can race but the race causes us to copy when we don't
|
||||||
need to and drop the copy */
|
need to and drop the copy */
|
||||||
|
|
|
@ -2354,10 +2354,8 @@ int make_pages_present(unsigned long addr, unsigned long end)
|
||||||
if (!vma)
|
if (!vma)
|
||||||
return -1;
|
return -1;
|
||||||
write = (vma->vm_flags & VM_WRITE) != 0;
|
write = (vma->vm_flags & VM_WRITE) != 0;
|
||||||
if (addr >= end)
|
BUG_ON(addr >= end);
|
||||||
BUG();
|
BUG_ON(end > vma->vm_end);
|
||||||
if (end > vma->vm_end)
|
|
||||||
BUG();
|
|
||||||
len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE;
|
len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE;
|
||||||
ret = get_user_pages(current, current->mm, addr,
|
ret = get_user_pages(current, current->mm, addr,
|
||||||
len, write, 0, NULL, NULL);
|
len, write, 0, NULL, NULL);
|
||||||
|
|
|
@ -183,8 +183,8 @@ EXPORT_SYMBOL(mempool_resize);
|
||||||
*/
|
*/
|
||||||
void mempool_destroy(mempool_t *pool)
|
void mempool_destroy(mempool_t *pool)
|
||||||
{
|
{
|
||||||
if (pool->curr_nr != pool->min_nr)
|
/* Check for outstanding elements */
|
||||||
BUG(); /* There were outstanding elements */
|
BUG_ON(pool->curr_nr != pool->min_nr);
|
||||||
free_pool(pool);
|
free_pool(pool);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mempool_destroy);
|
EXPORT_SYMBOL(mempool_destroy);
|
||||||
|
|
Loading…
Reference in a new issue