Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6927169rdb; Fri, 15 Dec 2023 12:05:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IElugo8dFR4st+nqRPCkh3h5kMmOllHZbrAYDKDU7xy5XssNSfv0wgrK4EUvoF1PYpbKfuE X-Received: by 2002:a17:903:2304:b0:1d3:7f26:b3b4 with SMTP id d4-20020a170903230400b001d37f26b3b4mr1793238plh.86.1702670755660; Fri, 15 Dec 2023 12:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702670755; cv=none; d=google.com; s=arc-20160816; b=B1ZAAaEhVbX3t9NMNGWa3bysu/TYJUCsEvVxzPDKGaG/RzRE89TIT54OAmoWR0Ptfu 4byYoLvYF0qAJNBdL9ZA12yJbLtVml/qa94ojLzFIibVH7uxOQeK63BrnWUkksuBMeNW uP35dKufPmGSjdYJU6tSlR4Dc64iVFdURhwzXb6IrDTeIorHRGeCkc4EHXKILQTCMVQe eH4IuG8vw+vwD16Fd/YtboLfezDhrMRXBuTGWnyApb6dAuFR1gVKwrOIFbj3GSKlBoJP PbzoSDJSfBEIhPQ9560965iN1+bDlCWaQuMf+nK6EQ8Bv4zGaf9GFQOBy/+Sm+DH/PiY bfnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/yLVY3qvXTW91YFKY50YK8NtYUoq7IQ3U6zezP7o3zI=; fh=timWtHA7UGScEpXk98kbQKGrJEBXaf2Y1JfEnqzAnNI=; b=I/hc6BRKV42LORVPQk9aeiEK6bhODoWxucqXtpg8ARbxLoJAs+GPCBvXJ30slVF1dA 3ZTt9NBJ5er9PuqhZLZcTFyrO/44rQ75IbJkvGpYAhJ2xr8RerDlkATRDCB7JMx7cFXK BfAU2D8YOMADdQaZZkc8sK2f9gsxkYE105CaPhZT3GgU8ZXIy/I9v1GdKPSYj7K5MvDm 7+0RaXAqrwxTIIEkcyHkU5QOzvY03exd1DIxAyN0lL/Q9QYbwlzETc1+g8QAMa6kOQQ1 64uq4kbyF/vJN+duUciWa2RaBb0IPq3sK045oEg7Txaiv01XbZkTIn1RVazD9V+YuK/F zMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="ZhE/bzSE"; spf=pass (google.com: domain of linux-kernel+bounces-1598-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1598-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t9-20020a170902e84900b001cc31c32e0fsi13807758plg.91.2023.12.15.12.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1598-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="ZhE/bzSE"; spf=pass (google.com: domain of linux-kernel+bounces-1598-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1598-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C8274286F27 for ; Fri, 15 Dec 2023 20:05:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F71A66ABB; Fri, 15 Dec 2023 20:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZhE/bzSE" X-Original-To: linux-kernel@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADC8356770; Fri, 15 Dec 2023 20:02:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/yLVY3qvXTW91YFKY50YK8NtYUoq7IQ3U6zezP7o3zI=; b=ZhE/bzSErGAKIq0i4CqeDdqDHQ KHmSkiLt3RL8zX4UJvxKXRLUyQkcSqxbaWnwW7Pir5OAMr9lY7X42cCSJbUdMaIhy/8tiECDoowfP jPku2JHA+XmaR8ISU758lnfDj5NCds1wwmjb78TqcGFsucJmlBoQaAt4KzveAP/MqrGBV2gv4Z3QL gJsezO8xGGnNXQscv4wG+S8pPN6NEbzALZaEfvsU50ZnpsKClX2SM/suJ2Ytpu7/maynpftI+Nadh bcDwVIZMwbq0JAbXowUVwbBWmDkVMElOdoe5QV/ZH4xV6Bdzhw+Us6y09sU6x0dNct69n+qVu99Gl xRjaacYw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rEEOW-0038jc-AU; Fri, 15 Dec 2023 20:02:48 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH 12/14] ufs: Remove writepage implementation Date: Fri, 15 Dec 2023 20:02:43 +0000 Message-Id: <20231215200245.748418-13-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231215200245.748418-1-willy@infradead.org> References: <20231215200245.748418-1-willy@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ufs/inode.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index ebce93b08281..a7bb2e63cdde 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -390,7 +391,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block, /** * ufs_getfrag_block() - `get_block_t' function, interface between UFS and - * read_folio, writepage and so on + * read_folio, writepages and so on */ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create) @@ -467,9 +468,10 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff return 0; } -static int ufs_writepage(struct page *page, struct writeback_control *wbc) +static int ufs_writepages(struct address_space *mapping, + struct writeback_control *wbc) { - return block_write_full_page(page,ufs_getfrag_block,wbc); + return mpage_writepages(mapping, wbc, ufs_getfrag_block); } static int ufs_read_folio(struct file *file, struct folio *folio) @@ -528,9 +530,10 @@ const struct address_space_operations ufs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = ufs_read_folio, - .writepage = ufs_writepage, + .writepages = ufs_writepages, .write_begin = ufs_write_begin, .write_end = ufs_write_end, + .migrate_folio = buffer_migrate_folio, .bmap = ufs_bmap }; -- 2.42.0