From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933157AbcBAOwU (ORCPT ); Mon, 1 Feb 2016 09:52:20 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36449 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932902AbcBAOwR (ORCPT ); Mon, 1 Feb 2016 09:52:17 -0500 From: Roman Pen Cc: Roman Pen , "Martin K. Petersen" , "Rafael J. Wysocki" , Alexander Viro , Dan Williams , Gi-Oh Kim , Jens Axboe , Len Brown , Ming Lei , Pavel Machek , Sagi Grimberg , Tejun Heo , Vishal Verma , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 0/4] introduce new put_getdisk() call Date: Mon, 1 Feb 2016 15:51:51 +0100 Message-Id: <1454338315-13465-1-git-send-email-roman.penyaev@profitbricks.com> X-Mailer: git-send-email 2.6.2 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. In this patchset in the first patch I fixed module reference leak inside blk-cgroup.c. In other patches I switched to a new put_getdisk() call, which should be used if the disk was received by get_disk() or get_gendisk() functions, which internally increase module reference. The idea is to avoid confusion in the future and to have symmetric calls: alloc_disk() -> put_disk() [as it is done in all the block drivers] and get_gendisk() -> put_gendisk() [if you need to find a disk by minor,major] The second sequence internally increases disk owner module reference on get and decreases it on put. Roman Pen (4): block: fix module reference leak on put_disk() call for cgroups throttle block: introduce new call put_gendisk() in genhd.c block,fs: switch to a new put_gendisk() call hibernate: fix disk and module leak on successfull resume block/blk-cgroup.c | 6 ++--- block/genhd.c | 59 +++++++++++++++++++++++++++++++++++++++++++++--- fs/block_dev.c | 24 ++++++-------------- include/linux/genhd.h | 1 + kernel/power/hibernate.c | 5 +++- 5 files changed, 71 insertions(+), 24 deletions(-) Cc: "Martin K. Petersen" Cc: "Rafael J. Wysocki" Cc: Alexander Viro Cc: Dan Williams Cc: Gi-Oh Kim Cc: Jens Axboe Cc: Len Brown Cc: Ming Lei Cc: Pavel Machek Cc: Sagi Grimberg Cc: Tejun Heo Cc: Vishal Verma Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org -- 2.6.2