From patchwork Wed May 24 06:38:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13253313 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E8C0C7EE33 for ; Wed, 24 May 2023 06:39:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 99B89280009; Wed, 24 May 2023 02:39:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94956280001; Wed, 24 May 2023 02:39:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 811D1280009; Wed, 24 May 2023 02:39:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6E74F280001 for ; Wed, 24 May 2023 02:39:13 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 429AAC087D for ; Wed, 24 May 2023 06:39:13 +0000 (UTC) X-FDA: 80824196586.02.120DA59 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf16.hostedemail.com (Postfix) with ESMTP id 8714418000D for ; Wed, 24 May 2023 06:39:11 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=loGcfNQq; dmarc=none; spf=none (imf16.hostedemail.com: domain of BATV+8349dc162fb675e8d54f+7213+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8349dc162fb675e8d54f+7213+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684910351; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=I7nRLrC53ZpahuFKynf6W2iN4n5J8f6yAz18mg2al/A=; b=yYNi8p8FS0l3TkkjAtPtWiNl+FCyRyZpa9yoo6SNmnTemBcOoSlYFmhUu4NP1a5idr4GOI Sg6XGGLn6HWbcWr5WRCxDAjtaWorNGWJRY3lYj2KjrSNarsRZEPCsDKUbw3m/E7VrYnv2G COJI5gt1pI1wfxNMdIBaZokSo/u/dLY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=loGcfNQq; dmarc=none; spf=none (imf16.hostedemail.com: domain of BATV+8349dc162fb675e8d54f+7213+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8349dc162fb675e8d54f+7213+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684910351; a=rsa-sha256; cv=none; b=CuoCya+U4v4zI49DyAw3H6x7J+5Z/gfsh7+zzVYBAF6cFB8hsXodiXcEUH5mrZfIa7KLCR UzclK7efvZ4ymmScG3a8unA/dQzSX9PPc+8an749JsnFnPZ4GZpQsnOxsWmrG3M+LoGdA7 HkaBE2Hg7umbrc7MQFTRQpoY9GWQVOc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=I7nRLrC53ZpahuFKynf6W2iN4n5J8f6yAz18mg2al/A=; b=loGcfNQqoDcdpH3rz6JPxASSDR s0fquDmmeLd7u6HychBoJwA1I1ehMTaxvhR/hGW1eOWoplEmBpgawme3dl/bkliWeD81N5gRQagz2 75qmOSQmgExHJPNJTU+rjkO+l0lbgtXMcL8u7p4ZgdUF2l2Y0hzxdH1lzlTbL0Y5w4ExDTy4vlzgD J0IgvzxF1QbdE/vnF/UZY4vxDgPzRezXMnqD7bbE1yilua/MaPprSSMxo7eCBWXprIYSQCK0MrICO J/7RLbRylWjr2yXwriuVGNUk9p8tErXqthikzs4ueQbj9vMzKxNthea3PnELRedBPiZHrAIcamUza 8s/a+Ehw==; Received: from [2001:4bb8:188:23b2:cbb8:fcea:a637:5089] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q1i8y-00CVkq-1K; Wed, 24 May 2023 06:38:44 +0000 From: Christoph Hellwig To: Matthew Wilcox Cc: Jens Axboe , Xiubo Li , Ilya Dryomov , Alexander Viro , Christian Brauner , "Theodore Ts'o" , Jaegeuk Kim , Chao Yu , Miklos Szeredi , Andreas Gruenbacher , "Darrick J. Wong" , Trond Myklebust , Anna Schumaker , Damien Le Moal , Andrew Morton , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 11/11] fuse: drop redundant arguments to fuse_perform_write Date: Wed, 24 May 2023 08:38:10 +0200 Message-Id: <20230524063810.1595778-12-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524063810.1595778-1-hch@lst.de> References: <20230524063810.1595778-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: 8714418000D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: gs3me6etrsg1przuecajax58ax4x4n6h X-HE-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uFsd5haYZTvYRaTvaKOVzDzNPOXuALHNAH0jgfo0YQZxQEA6ZntFEpcsXdfmtzkVQqqqhVpd5Wh0cwfxGnlxqPmIVV9PC913EUkYrAWBBxiI7ihZetKUmY2aK5XVQK0b1v2HrvyJWc687p4y+TYrBFno8xO80zSTxEC8Akncvx6Gq0i69iTT2CuwxQEe/R1Jv31LUaPCliM+8SbXB5UqAmOvg/31xZxRXiagzq98eAy3jDYOL/izXLc71v9CSGNDGjSdpN4YuYPrJJKXZoxtJs4yIfkoPWG03SWKycxiKEHMXLco3mqCXyXCA0W+/RCDq126BH8dhdcgURwOOSlf40zKH8ppOPQBmtRb4WW43JGhWcn6AMwiqAyTSD+lhZQi4GzH1YDd0c0w7rX8jw9jpUO/eb+WrkqLXVihnJjgIAeRNzt2SD8l3G6bpuUbeAXnEUZfZAaeI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: pos is always equal to iocb->ki_pos, and mapping is always equal to iocb->ki_filp->f_mapping. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Acked-by: Miklos Szeredi Reviewed-by: Hannes Reinecke --- fs/fuse/file.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 90d587a7bdf813..bf48aae49daf56 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1280,13 +1280,13 @@ static inline unsigned int fuse_wr_pages(loff_t pos, size_t len, max_pages); } -static ssize_t fuse_perform_write(struct kiocb *iocb, - struct address_space *mapping, - struct iov_iter *ii, loff_t pos) +static ssize_t fuse_perform_write(struct kiocb *iocb, struct iov_iter *ii) { + struct address_space *mapping = iocb->ki_filp->f_mapping; struct inode *inode = mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); + loff_t pos = iocb->ki_pos; int err = 0; ssize_t res = 0; @@ -1382,8 +1382,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) if (written < 0 || !iov_iter_count(from)) goto out; - written_buffered = fuse_perform_write(iocb, mapping, from, - iocb->ki_pos); + written_buffered = fuse_perform_write(iocb, from); if (written_buffered < 0) { err = written_buffered; goto out; @@ -1403,7 +1402,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) written += written_buffered; iocb->ki_pos += written_buffered; } else { - written = fuse_perform_write(iocb, mapping, from, iocb->ki_pos); + written = fuse_perform_write(iocb, from); } out: inode_unlock(inode);