+ pktcdvd-lockdep-fixes.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     pktcdvd lockdep fixes

has been added to the -mm tree.  Its filename is

     pktcdvd-lockdep-fixes.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: pktcdvd lockdep fixes
From: Peter Osterlund <petero2@xxxxxxxxx>

Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/block/pktcdvd.c |   12 ++++++------
 fs/block_dev.c          |    7 +++----
 include/linux/fs.h      |    1 +
 3 files changed, 10 insertions(+), 10 deletions(-)

diff -puN drivers/block/pktcdvd.c~pktcdvd-lockdep-fixes drivers/block/pktcdvd.c
--- a/drivers/block/pktcdvd.c~pktcdvd-lockdep-fixes
+++ a/drivers/block/pktcdvd.c
@@ -1922,7 +1922,7 @@ static int pkt_open_dev(struct pktcdvd_d
 	 * so bdget() can't fail.
 	 */
 	bdget(pd->bdev->bd_dev);
-	if ((ret = blkdev_get(pd->bdev, FMODE_READ, O_RDONLY)))
+	if ((ret = blkdev_get_partition(pd->bdev, FMODE_READ, O_RDONLY)))
 		goto out;
 
 	if ((ret = bd_claim(pd->bdev, pd)))
@@ -1971,7 +1971,7 @@ static int pkt_open_dev(struct pktcdvd_d
 out_unclaim:
 	bd_release(pd->bdev);
 out_putdev:
-	blkdev_put(pd->bdev);
+	blkdev_put_partition(pd->bdev);
 out:
 	return ret;
 }
@@ -1989,7 +1989,7 @@ static void pkt_release_dev(struct pktcd
 
 	pkt_set_speed(pd, MAX_SPEED, MAX_SPEED);
 	bd_release(pd->bdev);
-	blkdev_put(pd->bdev);
+	blkdev_put_partition(pd->bdev);
 
 	pkt_shrink_pktlist(pd);
 }
@@ -2339,7 +2339,7 @@ static int pkt_new_dev(struct pktcdvd_de
 	bdev = bdget(dev);
 	if (!bdev)
 		return -ENOMEM;
-	ret = blkdev_get(bdev, FMODE_READ, O_RDONLY | O_NONBLOCK);
+	ret = blkdev_get_partition(bdev, FMODE_READ, O_RDONLY | O_NONBLOCK);
 	if (ret)
 		return ret;
 
@@ -2368,7 +2368,7 @@ static int pkt_new_dev(struct pktcdvd_de
 	return 0;
 
 out_mem:
-	blkdev_put(bdev);
+	blkdev_put_partition(bdev);
 	/* This is safe: open() is still holding a reference. */
 	module_put(THIS_MODULE);
 	return ret;
@@ -2530,7 +2530,7 @@ static int pkt_remove_dev(struct pkt_ctr
 	if (!IS_ERR(pd->cdrw.thread))
 		kthread_stop(pd->cdrw.thread);
 
-	blkdev_put(pd->bdev);
+	blkdev_put_partition(pd->bdev);
 
 	remove_proc_entry(pd->name, pkt_proc);
 	DPRINTK("pktcdvd: writer %s unmapped\n", pd->name);
diff -puN fs/block_dev.c~pktcdvd-lockdep-fixes fs/block_dev.c
--- a/fs/block_dev.c~pktcdvd-lockdep-fixes
+++ a/fs/block_dev.c
@@ -829,9 +829,6 @@ struct block_device *open_by_devnum(dev_
 
 EXPORT_SYMBOL(open_by_devnum);
 
-static int
-blkdev_get_partition(struct block_device *bdev, mode_t mode, unsigned flags);
-
 struct block_device *open_partition_by_devnum(dev_t dev, unsigned mode)
 {
 	struct block_device *bdev = bdget(dev);
@@ -1042,7 +1039,7 @@ blkdev_get_whole(struct block_device *bd
 	return do_open(bdev, &fake_file, BD_MUTEX_WHOLE);
 }
 
-static int
+int
 blkdev_get_partition(struct block_device *bdev, mode_t mode, unsigned flags)
 {
 	/*
@@ -1061,6 +1058,8 @@ blkdev_get_partition(struct block_device
 	return do_open(bdev, &fake_file, BD_MUTEX_PARTITION);
 }
 
+EXPORT_SYMBOL(blkdev_get_partition);
+
 static int blkdev_open(struct inode * inode, struct file * filp)
 {
 	struct block_device *bdev;
diff -puN include/linux/fs.h~pktcdvd-lockdep-fixes include/linux/fs.h
--- a/include/linux/fs.h~pktcdvd-lockdep-fixes
+++ a/include/linux/fs.h
@@ -1478,6 +1478,7 @@ extern int ioctl_by_bdev(struct block_de
 extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
 extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
 extern int blkdev_get(struct block_device *, mode_t, unsigned);
+extern int blkdev_get_partition(struct block_device *, mode_t, unsigned);
 extern int blkdev_put(struct block_device *);
 extern int blkdev_put_partition(struct block_device *);
 extern int bd_claim(struct block_device *, void *);
_

Patches currently in -mm which might be from petero2@xxxxxxxxx are

lockdep-annotate-pktcdvd-natural-device-hierarchy.patch
pktcdvd-lockdep-fixes.patch
pktcdvd-lockdep-fixes-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux