diff options
| author | Junxuan Liao <ljx@cs.wisc.edu> | 2025-06-22 23:01:32 -0500 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-06-23 12:17:33 +0200 |
| commit | 2773d282cd56464f62e9b4703c41d2f733a67842 (patch) | |
| tree | 74326b19e67c7ee91acfc1aa84a80e0d3a988956 /fs/libfs.c | |
| parent | 6ae58121126dcf8efcc2611f216a36a5e50b8ad9 (diff) | |
| download | linux-2773d282cd56464f62e9b4703c41d2f733a67842.tar.gz linux-2773d282cd56464f62e9b4703c41d2f733a67842.tar.bz2 linux-2773d282cd56464f62e9b4703c41d2f733a67842.zip | |
docs/vfs: update references to i_mutex to i_rwsem
VFS has switched to i_rwsem for ten years now (9902af79c01a: parallel
lookups actual switch to rwsem), but the VFS documentation and comments
still has references to i_mutex.
Signed-off-by: Junxuan Liao <ljx@cs.wisc.edu>
Link: https://lore.kernel.org/72223729-5471-474a-af3c-f366691fba82@cs.wisc.edu
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/libfs.c')
| -rw-r--r-- | fs/libfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 9ea0ecc325a8..4d1862f589e8 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -946,7 +946,8 @@ EXPORT_SYMBOL(simple_write_begin); * simple_write_end does the minimum needed for updating a folio after * writing is done. It has the same API signature as the .write_end of * address_space_operations vector. So it can just be set onto .write_end for - * FSes that don't need any other processing. i_mutex is assumed to be held. + * FSes that don't need any other processing. i_rwsem is assumed to be held + * exclusively. * Block based filesystems should use generic_write_end(). * NOTE: Even though i_size might get updated by this function, mark_inode_dirty * is not called, so a filesystem that actually does store data in .write_inode @@ -973,7 +974,7 @@ static int simple_write_end(struct file *file, struct address_space *mapping, } /* * No need to use i_size_read() here, the i_size - * cannot change under us because we hold the i_mutex. + * cannot change under us because we hold the i_rwsem. */ if (last_pos > inode->i_size) i_size_write(inode, last_pos); |
