From patchwork Wed Jan 21 19:33:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 5680121 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A10399F2ED for ; Wed, 21 Jan 2015 19:33:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 152C7204AF for ; Wed, 21 Jan 2015 19:33:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7207B2026F for ; Wed, 21 Jan 2015 19:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754408AbbAUTdg (ORCPT ); Wed, 21 Jan 2015 14:33:36 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:44390 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053AbbAUTdb (ORCPT ); Wed, 21 Jan 2015 14:33:31 -0500 Received: from pps.filterd (m0044010 [127.0.0.1]) by mx0a-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id t0LJTXbt024110; Wed, 21 Jan 2015 11:33:10 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=message-id : date : from : mime-version : to : cc : subject : references : in-reply-to : content-type; s=facebook; bh=ZQWfM8yqnd+J5Ic/HwJbJiIhLsbpnFzDVukUBTbSzMk=; b=SGEk7gMhawvvSsXEwFWT+Nd9Uvc5pZEeFUyujlUZxIQ44jPv6f5lG47MTmuxuBMBBnYa vK7IIiDfVGEEvSoJapOkvZit+opz7RqFvNJoI30HPs5Q+XinpBg5hU3khtR5WtmvnqYC yrFBdhFf53Ir+yjuOOf6FH+K31lMH7wMnOs= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 1s2h4fhb76-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK); Wed, 21 Jan 2015 11:33:10 -0800 Received: from [172.20.10.3] (192.168.57.29) by mail.thefacebook.com (192.168.16.13) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Jan 2015 11:33:08 -0800 Message-ID: <54BFFEF3.1070809@fb.com> Date: Wed, 21 Jan 2015 12:33:07 -0700 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Christoph Hellwig CC: Subject: Re: [BUG] Oops in inode_to_bdi() References: <20150121191707.GA27823@kernel.dk> <20150121192949.GA24787@infradead.org> In-Reply-To: <20150121192949.GA24787@infradead.org> X-Originating-IP: [192.168.57.29] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-01-21_04:2015-01-21, 2015-01-21, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=4.94049245958195e-15 kscore.compositescore=0 circleOfTrustscore=12.5163470709309 compositescore=0.988724513632049 urlsuspect_oldscore=0.988724513632049 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=62764 rbsscore=0.988724513632049 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1501210189 X-FB-Internal: deliver Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,T_TVD_MIME_EPI, 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 On 01/21/2015 12:29 PM, Christoph Hellwig wrote: > On Wed, Jan 21, 2015 at 12:17:07PM -0700, Jens Axboe wrote: >> Christoph, >> >> Ran into this one while testing. Looks like mapping->host is NULL, off >> the shmem_writepage(). > > Hmm. Not sure how this can happen, but for a NULL inode we can > always just return noop_backing_dev_info safely, I'll cook up a patch. I got 8 of them in a row. Current kernel is running with the attached, just to see if I can reproduce it. diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index a20b1145f4d5..4f03e33365e1 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -68,7 +68,12 @@ EXPORT_SYMBOL(writeback_in_progress); struct backing_dev_info *inode_to_bdi(struct inode *inode) { - struct super_block *sb = inode->i_sb; + struct super_block *sb; + + if (WARN_ON(!inode)) + return &noop_backing_dev_info; + + sb = inode->i_sb; #ifdef CONFIG_BLOCK if (sb_is_blkdev_sb(sb)) return blk_get_backing_dev_info(I_BDEV(inode));