diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 565b8dac5782..5a4ff505fd12 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -552,6 +552,7 @@ static void blk_free_queue_rcu(struct rcu_head *rcu_head) { struct request_queue *q = container_of(rcu_head, struct request_queue, rcu_head); + printk("freeing q\n"); kmem_cache_free(blk_requestq_cachep, q); } diff --git a/fs/block_dev.c b/fs/block_dev.c index bb0dfb1c7af1..6475dac5f3bc 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1496,6 +1496,8 @@ static int blkdev_open(struct inode * inode, struct file * filp) return blkdev_get(bdev, filp->f_mode, filp); } +#include + static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) { struct gendisk *disk = bdev->bd_disk; @@ -1531,6 +1533,12 @@ static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) put_disk(disk); module_put(owner); + + if (!strcmp(current->comm, "systemd-udevd")) { + printk("sleep start %d\n", task_pid_nr(current)); + ssleep(3); + printk("sleep end %d\n", task_pid_nr(current)); + } } mutex_unlock(&bdev->bd_mutex); bdput(bdev); diff --git a/fs/inode.c b/fs/inode.c index 1be5f9003eb3..10625eeb7816 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1490,6 +1490,8 @@ void iput(struct inode *inode) { if (!inode) return; + if (inode->i_wb) + BUG_ON(atomic_long_read(&inode->i_wb->refcnt.count) == 0x6b6b6b6b6b6b6b6b); BUG_ON(inode->i_state & I_CLEAR); retry: if (atomic_dec_and_lock(&inode->i_count, &inode->i_lock)) {