From: Miklos Szeredi <miklos@szeredi.hu>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] fuse: Change argument of fuse_flush_writepages()
Date: Wed, 7 Nov 2018 15:00:30 +0100 [thread overview]
Message-ID: <CAJfpegsJzRPB0vYJehh4wb6TPai9Bit7=dveTv0ha9eg0UMPDw@mail.gmail.com> (raw)
In-Reply-To: <154149742122.18189.7228444587279544540.stgit@localhost.localdomain>
On Tue, Nov 6, 2018 at 10:43 AM, Kirill Tkhai <ktkhai@virtuozzo.com> 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 <ktkhai@virtuozzo.com>
> ---
> 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);
>
next prev parent reply other threads:[~2018-11-07 23:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 9:43 [PATCH 0/6] fuse: Further reducing contention of fc->lock Kirill Tkhai
2018-11-06 9:43 ` [PATCH 1/6] fuse: Change argument of fuse_flush_writepages() Kirill Tkhai
2018-11-07 14:00 ` Miklos Szeredi [this message]
2018-11-06 9:43 ` [PATCH 2/6] fuse: Add fuse_inode argument to fuse_prepare_release() Kirill Tkhai
2018-11-06 9:43 ` [PATCH 3/6] fuse: Introduce fuse_inode::lock to protect write related fields and statistics Kirill Tkhai
2018-11-06 9:43 ` [PATCH 4/6] fuse: Implement fuse_attr_version_inc() Kirill Tkhai
2018-11-07 14:12 ` Miklos Szeredi
2018-11-06 9:44 ` [PATCH 5/6] fuse: Protect fuse_inode::nlookup with fuse_inode::lock Kirill Tkhai
2018-11-07 14:20 ` Miklos Szeredi
2018-11-06 9:44 ` [PATCH 6/6] fuse: Protect fuse_file::reserved_req via corresponding fuse_inode::lock Kirill Tkhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJfpegsJzRPB0vYJehh4wb6TPai9Bit7=dveTv0ha9eg0UMPDw@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=ktkhai@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).