From patchwork Sat Jul 4 15:12:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 6718281 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 05CE6C05AC for ; Sun, 5 Jul 2015 10:30:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E82BE20634 for ; Sun, 5 Jul 2015 10:30:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E228B20630 for ; Sun, 5 Jul 2015 10:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbbGEKa1 (ORCPT ); Sun, 5 Jul 2015 06:30:27 -0400 Received: from mail-qg0-f51.google.com ([209.85.192.51]:33954 "EHLO mail-qg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685AbbGEKaZ (ORCPT ); Sun, 5 Jul 2015 06:30:25 -0400 Received: by qgii30 with SMTP id i30so59312064qgi.1; Sun, 05 Jul 2015 03:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Fam2iyzulkfsxGmq4cJUUDsT0rbz3r5QvJNwxd8/9WM=; b=bYhL2IsLMZD0MhOxjOpKsxzzgFcd0XQq8+IO3ErSRJyN0rHWtC5imx0KjmUOZE68rd p2EH+Bib890tm8c9u0rtZbAWCiy6N0MAelvd4dMeN27PAmIV/zhOWOz8GZR6r4tiBhYF QKevT+wQ0CIBytiZnyDZ4pGG9emF1OHt65Q4adrIfGJr3EPO3jucSqUZYkDjgxIRTq/P ORH/jomlaiMyKjtKaqTIhQKCZTFmBz/VxukS9WyZCFU7mVW/FYEuxAmoAftQkn0X7YJj gE1hBCxotV17xfYB8s3loyKrp+ALXxksdGF6vXAHOaJAa2dGQUwVR4K1bwwJjvu3rGWw NK7A== X-Received: by 10.140.144.73 with SMTP id 70mr61305079qhq.91.1436022724125; Sat, 04 Jul 2015 08:12:04 -0700 (PDT) Received: from mtj.duckdns.org ([2604:2000:40e1:1400:3602:86ff:fe00:dead]) by mx.google.com with ESMTPSA id a65sm6275388qkh.43.2015.07.04.08.12.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Jul 2015 08:12:03 -0700 (PDT) Date: Sat, 4 Jul 2015 11:12:00 -0400 From: Tejun Heo To: Jan Kara Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, hch@infradead.org, hannes@cmpxchg.org, linux-fsdevel@vger.kernel.org, vgoyal@redhat.com, lizefan@huawei.com, cgroups@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.cz, clm@fb.com, fengguang.wu@intel.com, david@fromorbit.com, gthelen@google.com, khlebnikov@yandex-team.ru Subject: [PATCH block/for-4.3] writeback: explain why @inode is allowed to be NULL for inode_congested() Message-ID: <20150704151200.GA13251@mtj.duckdns.org> References: <1432329245-5844-1-git-send-email-tj@kernel.org> <1432329245-5844-31-git-send-email-tj@kernel.org> <20150630152105.GP7252@quack.suse.cz> <20150702014634.GF26440@mtj.duckdns.org> <20150703121721.GJ23329@quack.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150703121721.GJ23329@quack.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tejun Heo Suggested-by: Jan Kara --- Hello, So, something like this. I'll resend this patch as part of a patch series once -rc1 drops. Thanks. fs/fs-writeback.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -700,7 +700,7 @@ void wbc_account_io(struct writeback_con /** * inode_congested - test whether an inode is congested - * @inode: inode to test for congestion + * @inode: inode to test for congestion (may be NULL) * @cong_bits: mask of WB_[a]sync_congested bits to test * * Tests whether @inode is congested. @cong_bits is the mask of congestion @@ -710,6 +710,9 @@ void wbc_account_io(struct writeback_con * determined by whether the cgwb (cgroup bdi_writeback) for the blkcg * associated with @inode is congested; otherwise, the root wb's congestion * state is used. + * + * @inode is allowed to be NULL as this function is often called on + * mapping->host which is NULL for the swapper space. */ int inode_congested(struct inode *inode, int cong_bits) {