Linux Documentation
 help / color / mirror / Atom feed
From: Junxuan Liao <ljx@cs.wisc.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH v2] docs/vfs: update references to i_mutex to i_rwsem
Date: Wed, 25 Jun 2025 13:51:33 -0500	[thread overview]
Message-ID: <bc25ec40-bda3-44d6-b9c0-d27f7b35b7cb@cs.wisc.edu> (raw)
In-Reply-To: <bi5e6qyg6htcmuocfahgvwxx2djxyeorhlc425y72pggmvw4hi@dzfheotxoz7j>

Hi Christian and Jan,

On 6/23/25 6:09 AM, Jan Kara wrote:
> One comment below. Christian, can you please fix it up? Otherwise feel free
> to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
>> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
>> index fd32a9a17bfb..dd9da7e04a99 100644
>> --- a/Documentation/filesystems/vfs.rst
>> +++ b/Documentation/filesystems/vfs.rst
>> @@ -758,8 +758,9 @@ process is more complicated and uses write_begin/write_end or
>>  dirty_folio to write data into the address_space, and
>>  writepages to writeback data to storage.
>>  
>> -Adding and removing pages to/from an address_space is protected by the
>> -inode's i_mutex.
>> +Removing pages from an address_space requires holding the inode's i_rwsem
>> +exclusively, while adding pages to the address_space requires holding the
>> +inode's i_mapping->invalidate_lock exclusively.
> 
> I wasn't probably precise enough in my previous comment. This paragraph
> should be:
> 
> Removing pages from an address_space requires holding the inode's i_rwsem
> exclusively and i_mapping->invalidate_lock exclusively. Adding pages to the
> address_space requires either holding inode's i_rwsem exclusively or
> i_mapping->invalidate_lock in shared mode.

Sorry I missed that part. Could you please fix this in the commit?

-- 
Thanks,
Junxuan

      reply	other threads:[~2025-06-25 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  4:01 [PATCH v2] docs/vfs: update references to i_mutex to i_rwsem Junxuan Liao
2025-06-23 10:17 ` Christian Brauner
2025-06-23 11:09 ` Jan Kara
2025-06-25 18:51   ` Junxuan Liao [this message]

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=bc25ec40-bda3-44d6-b9c0-d27f7b35b7cb@cs.wisc.edu \
    --to=ljx@cs.wisc.edu \
    --cc=brauner@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jack@suse.cz \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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