[PATCH 1/3] blk-iolatency: fix blkg leak in timer_fn

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

 



At this point we have a ref on the blkg, we need to drop it if we don't
have a iolat.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
 block/blk-iolatency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index bb59b2929e0d..b0dc4fc64b3e 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -627,7 +627,7 @@ static void blkiolatency_timer_fn(struct timer_list *t)
 
 		iolat = blkg_to_lat(blkg);
 		if (!iolat)
-			continue;
+			goto next;
 
 		lat_info = &iolat->child_lat;
 		cookie = atomic_read(&lat_info->scale_cookie);
-- 
2.14.3




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux