summaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-06 08:00:48 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-06 08:00:48 +0100
commit02cee68998010c4a2cc2383c86babc2ecc737183 (patch)
tree13c6483472f672c3b2570b075ed2ad4fd4c5405e /drivers/block/loop.c
parentInput: synaptic_i2c - make unnecessarily global functions static (diff)
parentLinux 2.6.32-rc6 (diff)
downloadlinux-02cee68998010c4a2cc2383c86babc2ecc737183.tar.xz
linux-02cee68998010c4a2cc2383c86babc2ecc737183.zip
Merge commit 'v2.6.32-rc6' into next
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index edda9ea7c626..bd112c8c7bcd 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -949,7 +949,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
lo->lo_state = Lo_unbound;
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
- if (max_part > 0)
+ if (max_part > 0 && bdev)
ioctl_by_bdev(bdev, BLKRRPART, 0);
mutex_unlock(&lo->lo_ctl_mutex);
/*