From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FCA6C433DF for ; Tue, 25 Aug 2020 20:50:02 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01818206EB for ; Tue, 25 Aug 2020 20:50:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="F8uab4sP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01818206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C6E8B114493D5; Tue, 25 Aug 2020 13:50:01 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=156.151.31.86; helo=userp2130.oracle.com; envelope-from=darrick.wong@oracle.com; receiver= Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5900C114493CB for ; Tue, 25 Aug 2020 13:49:59 -0700 (PDT) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07PKixMQ156255; Tue, 25 Aug 2020 20:49:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=ImYJvkWuSHo5qIDzd5Wm+ZtgL4tShmllmY0/Qa3RjH0=; b=F8uab4sPAWlMhR9niVn/qXvXNnKJD5l7PLU4V09rUN8KoEPrS+9kdNTjBLSI/4rGPOGm tTF1GZbU0HB4JojOLity0rXLxJdi+XK+2XyGX6NZqG7YsYPQ2DEJk5+4SR4RorqiXhz7 1mTAbLLASWfN4/Gs7gsuU/cwIe44JHEX+vMZri5ONrjeSvFsJc7qRgRrEHvmioaV3BA+ HjQcwpRYvvBz55+ti/DVBycD84iwrwwpqU8SBuGJhWdi4QUovB5IdQUDqINHIEq6IuYX WR7Y6vE7K6+8bx2gePfm41rx1cHjiWUwa9tJ4MebyuODgmsTsxrYGdC4yGLbppTd/H5l VQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 333csj4x32-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Aug 2020 20:49:56 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07PKkDPK117022; Tue, 25 Aug 2020 20:49:55 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 333ru8f5d8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Aug 2020 20:49:55 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07PKntNZ020917; Tue, 25 Aug 2020 20:49:55 GMT Received: from localhost (/10.159.234.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 25 Aug 2020 13:49:54 -0700 Date: Tue, 25 Aug 2020 13:49:53 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Subject: Re: [PATCH 3/9] iomap: Use kzalloc to allocate iomap_page Message-ID: <20200825204953.GH6096@magnolia> References: <20200824145511.10500-1-willy@infradead.org> <20200824145511.10500-4-willy@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200824145511.10500-4-willy@infradead.org> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9724 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=997 phishscore=0 bulkscore=0 suspectscore=1 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008250157 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9724 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 clxscore=1015 spamscore=0 priorityscore=1501 impostorscore=0 adultscore=0 lowpriorityscore=0 suspectscore=1 mlxlogscore=970 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008250157 Message-ID-Hash: B3YDT4MKP3JOCWAQTDLH27JB3GQJPGA6 X-Message-ID-Hash: B3YDT4MKP3JOCWAQTDLH27JB3GQJPGA6 X-MailFrom: darrick.wong@oracle.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Christoph Hellwig X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Aug 24, 2020 at 03:55:04PM +0100, Matthew Wilcox (Oracle) wrote: > We can skip most of the initialisation, although spinlocks still > need explicit initialisation as architectures may use a non-zero > value to indicate unlocked. The comment is no longer useful as > attach_page_private() handles the refcount now. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig Looks good to me, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 13d5cdab8dcd..639d54a4177e 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -49,16 +49,8 @@ iomap_page_create(struct inode *inode, struct page *page) > if (iop || i_blocks_per_page(inode, page) <= 1) > return iop; > > - iop = kmalloc(sizeof(*iop), GFP_NOFS | __GFP_NOFAIL); > - atomic_set(&iop->read_count, 0); > - atomic_set(&iop->write_count, 0); > + iop = kzalloc(sizeof(*iop), GFP_NOFS | __GFP_NOFAIL); > spin_lock_init(&iop->uptodate_lock); > - bitmap_zero(iop->uptodate, PAGE_SIZE / SECTOR_SIZE); > - > - /* > - * migrate_page_move_mapping() assumes that pages with private data have > - * their count elevated by 1. > - */ > attach_page_private(page, iop); > return iop; > } > -- > 2.28.0 > _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org