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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B29EDC38159 for ; Thu, 19 Jan 2023 01:20:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbjASBUF (ORCPT ); Wed, 18 Jan 2023 20:20:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjASBR6 (ORCPT ); Wed, 18 Jan 2023 20:17:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EEAF69225 for ; Wed, 18 Jan 2023 17:15:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E11A5B81FBE for ; Thu, 19 Jan 2023 01:15:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88F47C433D2; Thu, 19 Jan 2023 01:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1674090940; bh=/qd60Wg5zPKj5GUEdMm74qnakNmPqArZksByfBF0Fu4=; h=Date:To:From:Subject:From; b=AExnyELfC0GR+1W2xGjzeQL4X6Zf/4V8mx/LxfNR++1TLvH4g1MKlakQigyissDwa uPKZ3486EOmlEDIjSgcx8v9OQgyei2fLjTg0ZHEvO4Q+yvpblZG3QtBpyw9rN7UV7p 7GC+aBcnxnqf0SbGAGvT00GjMfe8kIaAgxOOR2wc= Date: Wed, 18 Jan 2023 17:15:40 -0800 To: mm-commits@vger.kernel.org, willy@infradead.org, tytso@mit.edu, mark@fasheh.com, joseph.qi@linux.alibaba.com, jlbec@evilplan.org, jack@suse.com, almaz.alexandrovich@paragon-software.com, hch@lst.de, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] ntfs3-stop-using-generic_writepages.patch removed from -mm tree Message-Id: <20230119011540.88F47C433D2@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: ntfs3: stop using generic_writepages has been removed from the -mm tree. Its filename was ntfs3-stop-using-generic_writepages.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Christoph Hellwig Subject: ntfs3: stop using generic_writepages Date: Thu, 29 Dec 2022 06:10:27 -1000 Open code the resident inode handling in ntfs_writepages by directly using write_cache_pages to prepare removing the ->writepage handler in ntfs3. Link: https://lkml.kernel.org/r/20221229161031.391878-3-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton --- fs/ntfs3/inode.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) --- a/fs/ntfs3/inode.c~ntfs3-stop-using-generic_writepages +++ a/fs/ntfs3/inode.c @@ -852,12 +852,29 @@ static int ntfs_writepage(struct page *p return block_write_full_page(page, ntfs_get_block, wbc); } +static int ntfs_resident_writepage(struct page *page, + struct writeback_control *wbc, void *data) +{ + struct address_space *mapping = data; + struct ntfs_inode *ni = ntfs_i(mapping->host); + int ret; + + ni_lock(ni); + ret = attr_data_write_resident(ni, page); + ni_unlock(ni); + + if (ret != E_NTFS_NONRESIDENT) + unlock_page(page); + mapping_set_error(mapping, ret); + return ret; +} + static int ntfs_writepages(struct address_space *mapping, struct writeback_control *wbc) { - /* Redirect call to 'ntfs_writepage' for resident files. */ if (is_resident(ntfs_i(mapping->host))) - return generic_writepages(mapping, wbc); + return write_cache_pages(mapping, wbc, ntfs_resident_writepage, + mapping); return mpage_writepages(mapping, wbc, ntfs_get_block); } _ Patches currently in -mm which might be from hch@lst.de are