Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3153237imu; Wed, 7 Nov 2018 06:02:39 -0800 (PST) X-Google-Smtp-Source: AJdET5eg5AusQvPdbS3SQYSSH1YYVsq/qMg10HN6qh7dHXgUN+Mxw2Wn8ikxXkjs8lAkiaqsqAGY X-Received: by 2002:a17:902:6901:: with SMTP id j1-v6mr372712plk.26.1541599359793; Wed, 07 Nov 2018 06:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541599359; cv=none; d=google.com; s=arc-20160816; b=uLUpn2UmDD1HEOxLB5Fh3dCmYaGJ9f19mN3rsk5Ov/2BoAdb4P7uN6/aQxXeqtM8eV dskNUmbkzDkL0F1ILjiP1/bj1yK802+af2yAFCrHKcbfVEPvll2Zq6bQ3oTkPcnLhGzQ W6sV0TpvZFmxMn6Fhl09wMGQdkUxqnUnlkmhob104/YDusSynBYDbIvsy1lxucnAL6Gm TdTUnGt0cZFS7SpK2AjPVo+Og7ieLQwKs7KW8q2+cASU0/SKd75t7HHJVIGpTX/IOUis Zd+ArtDnqMs9yAuODiNJGgB0JACvIZ/xZa2PXo2U9XXLskiGM8kS0GzjLL0vQ9Oko8fP KltA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=CwCH3raObH2S1rhqUVX/A2JT7LcCOiz2vy4oIzv/N+s=; b=NX9fJb4Afa+droZ8s237964D1PvV7fCqPzKpfSGSft60XOSZ4ycuOeH6r4whvOz3xP GYg7CQaUCPn3rMdqTkYBePGArG5jNap8UEpQ9a0ku1VmBNJo3RQGUzQ0gAw29kdUkrv4 0jC9nMlWEL/zf2NTLd6hZld8GDTUVEmel+9sFDh2ezeQF3BxRI/t6RWtpZTqLCkO0BiG pqUnRISUqQ8wcLEyerW+vrHIoLj9LQrK+Ycaos7z9N4W6vCqg9jsIRi4vWJcR5pK++Qv ptHm8RXaFIDny8lI2O0mtugKKd0achSG3h5p6yTfacUYkJ7pZGlQnKXPz1+Q1jTxQ2oM 9N3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=cKLFBNoZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20-v6si734109plr.343.2018.11.07.06.02.23; Wed, 07 Nov 2018 06:02:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=cKLFBNoZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727775AbeKGXbC (ORCPT + 99 others); Wed, 7 Nov 2018 18:31:02 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:46589 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbeKGXbC (ORCPT ); Wed, 7 Nov 2018 18:31:02 -0500 Received: by mail-io1-f66.google.com with SMTP id y22-v6so11904217ioj.13 for ; Wed, 07 Nov 2018 06:00:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CwCH3raObH2S1rhqUVX/A2JT7LcCOiz2vy4oIzv/N+s=; b=cKLFBNoZSmQdOrnNmQk+bp9iKVO/PnjKgU9YVfm4L1lfO215CNYlaQMJ6ebStqPxIe j3dPvwYOcwdnQyaeI80ZPIWGwVarHn//R04UwYZAZ8AJbT6nwVk6SeqEaNcSyPX9U95a ofMXO08dIucMMQeoNMxPrS5Rj7tgufAjki1d8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CwCH3raObH2S1rhqUVX/A2JT7LcCOiz2vy4oIzv/N+s=; b=K3XSRq0dxl+v/OGbSGOf8MlsncDbPwHllhw4z3TY35kuzECqvZS0XWBxKFg6QJyMRM luf3oDfyLTdaG/LSbTmCkEYJFcZq6Kkg2XcBzyz2ctJ5CQ/h7auScWByKOAtYm03I78Y vAfzXEDmnM8DJoMJvDEqKBSEGfZQC8GM3uSo0A9TgLaENtAEOJ+bkKvRuGwEf8uNs6ke F6kkRVAsEtyPuxUq2zmrawUst8X7yxjgm+yN54LC9PO/S1+DTgd64Vw+SO2xcQZ70UiC rFvkzcazttwfE6zYcQ/HwevlHYcMnwq1nbjIw4T00cGSKqZN8AuDzpeMGBfuh3LCVewB IHvg== X-Gm-Message-State: AGRZ1gIYFCZjAdhzHWGcJnS9loXROfmDYTRzUTobxtlV9V2Na5WeWCIC tqfu5IoqO7GwfSrpPCZBcF+nXarBbB0h6c/TBpWtAMy4 X-Received: by 2002:a5e:8b42:: with SMTP id z2-v6mr236163iom.144.1541599231607; Wed, 07 Nov 2018 06:00:31 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a6b:ac42:0:0:0:0:0 with HTTP; Wed, 7 Nov 2018 06:00:30 -0800 (PST) X-Originating-IP: [212.96.48.140] In-Reply-To: <154149742122.18189.7228444587279544540.stgit@localhost.localdomain> References: <154149673368.18189.14752124997476502777.stgit@localhost.localdomain> <154149742122.18189.7228444587279544540.stgit@localhost.localdomain> From: Miklos Szeredi Date: Wed, 7 Nov 2018 15:00:30 +0100 Message-ID: Subject: Re: [PATCH 1/6] fuse: Change argument of fuse_flush_writepages() To: Kirill Tkhai Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 6, 2018 at 10:43 AM, Kirill Tkhai wrote: > Next patches introduce fuse_inode::lock, which will be used > in __releases() and __acquires() instead of fc->lock. > This patch makes this function to use argument fuse_inode > instead of inode as preparation for that. This patch seems like perfectly useless, just change fc->lock to fi->lock in the next patch and be done with that. > > Signed-off-by: Kirill Tkhai > --- > fs/fuse/dir.c | 2 +- > fs/fuse/file.c | 8 ++++---- > fs/fuse/fuse_i.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c > index 47395b0c3b35..c71f7e9ee0f7 100644 > --- a/fs/fuse/dir.c > +++ b/fs/fuse/dir.c > @@ -1360,7 +1360,7 @@ static void __fuse_release_nowrite(struct inode *inode) > > BUG_ON(fi->writectr != FUSE_NOWRITE); > fi->writectr = 0; > - fuse_flush_writepages(inode); > + fuse_flush_writepages(fi); > } > > void fuse_release_nowrite(struct inode *inode) > diff --git a/fs/fuse/file.c b/fs/fuse/file.c > index cc2121b37bf5..d5bd29610875 100644 > --- a/fs/fuse/file.c > +++ b/fs/fuse/file.c > @@ -1522,12 +1522,12 @@ __acquires(fc->lock) > * > * Called with fc->lock > */ > -void fuse_flush_writepages(struct inode *inode) > +void fuse_flush_writepages(struct fuse_inode *fi) > __releases(fc->lock) > __acquires(fc->lock) > { > + struct inode *inode = &fi->inode; > struct fuse_conn *fc = get_fuse_conn(inode); > - struct fuse_inode *fi = get_fuse_inode(inode); > size_t crop = i_size_read(inode); > struct fuse_req *req; > > @@ -1670,7 +1670,7 @@ static int fuse_writepage_locked(struct page *page) > spin_lock(&fc->lock); > list_add(&req->writepages_entry, &fi->writepages); > list_add_tail(&req->list, &fi->queued_writes); > - fuse_flush_writepages(inode); > + fuse_flush_writepages(fi); > spin_unlock(&fc->lock); > > end_page_writeback(page); > @@ -1728,7 +1728,7 @@ static void fuse_writepages_send(struct fuse_fill_wb_data *data) > req->ff = fuse_file_get(data->ff); > spin_lock(&fc->lock); > list_add_tail(&req->list, &fi->queued_writes); > - fuse_flush_writepages(inode); > + fuse_flush_writepages(fi); > spin_unlock(&fc->lock); > > for (i = 0; i < num_pages; i++) > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > index e9f712e81c7d..38bd7ca1908a 100644 > --- a/fs/fuse/fuse_i.h > +++ b/fs/fuse/fuse_i.h > @@ -995,7 +995,7 @@ void fuse_update_ctime(struct inode *inode); > > int fuse_update_attributes(struct inode *inode, struct file *file); > > -void fuse_flush_writepages(struct inode *inode); > +void fuse_flush_writepages(struct fuse_inode *fi); > > void fuse_set_nowrite(struct inode *inode); > void fuse_release_nowrite(struct inode *inode); >