diff mbox series

vfs: inode insertion kdoc corrections

Message ID 20241004115151.44834-1-agruenba@redhat.com (mailing list archive)
State New
Headers show
Series vfs: inode insertion kdoc corrections | expand

Commit Message

Andreas Gruenbacher Oct. 4, 2024, 11:51 a.m. UTC
Some minor corrections to the inode_insert5 and iget5_locked kernel
documentation.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/inode.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

Comments

Jan Kara Oct. 4, 2024, 12:27 p.m. UTC | #1
On Fri 04-10-24 13:51:51, Andreas Gruenbacher wrote:
> Some minor corrections to the inode_insert5 and iget5_locked kernel
> documentation.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/inode.c | 25 ++++++++++++-------------
>  1 file changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/inode.c b/fs/inode.c
> index 471ae4a31549..6b3ff38df7f7 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -1239,16 +1239,15 @@ EXPORT_SYMBOL(unlock_two_nondirectories);
>   * @data:	opaque data pointer to pass to @test and @set
>   *
>   * Search for the inode specified by @hashval and @data in the inode cache,
> - * and if present it is return it with an increased reference count. This is
> - * a variant of iget5_locked() for callers that don't want to fail on memory
> - * allocation of inode.
> + * and if present return it with an increased reference count. This is a
> + * variant of iget5_locked() that doesn't allocate an inode.
>   *
> - * If the inode is not in cache, insert the pre-allocated inode to cache and
> + * If the inode is not present in the cache, insert the pre-allocated inode and
>   * return it locked, hashed, and with the I_NEW flag set. The file system gets
>   * to fill it in before unlocking it via unlock_new_inode().
>   *
> - * Note both @test and @set are called with the inode_hash_lock held, so can't
> - * sleep.
> + * Note that both @test and @set are called with the inode_hash_lock held, so
> + * they can't sleep.
>   */
>  struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
>  			    int (*test)(struct inode *, void *),
> @@ -1312,16 +1311,16 @@ EXPORT_SYMBOL(inode_insert5);
>   * @data:	opaque data pointer to pass to @test and @set
>   *
>   * Search for the inode specified by @hashval and @data in the inode cache,
> - * and if present it is return it with an increased reference count. This is
> - * a generalized version of iget_locked() for file systems where the inode
> + * and if present return it with an increased reference count. This is a
> + * generalized version of iget_locked() for file systems where the inode
>   * number is not sufficient for unique identification of an inode.
>   *
> - * If the inode is not in cache, allocate a new inode and return it locked,
> - * hashed, and with the I_NEW flag set. The file system gets to fill it in
> - * before unlocking it via unlock_new_inode().
> + * If the inode is not present in the cache, allocate and insert a new inode
> + * and return it locked, hashed, and with the I_NEW flag set. The file system
> + * gets to fill it in before unlocking it via unlock_new_inode().
>   *
> - * Note both @test and @set are called with the inode_hash_lock held, so can't
> - * sleep.
> + * Note that both @test and @set are called with the inode_hash_lock held, so
> + * they can't sleep.
>   */
>  struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
>  		int (*test)(struct inode *, void *),
> -- 
> 2.46.1
>
Christian Brauner Oct. 7, 2024, 11:49 a.m. UTC | #2
On Fri, 04 Oct 2024 13:51:51 +0200, Andreas Gruenbacher wrote:
> Some minor corrections to the inode_insert5 and iget5_locked kernel
> documentation.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] vfs: inode insertion kdoc corrections
      https://git.kernel.org/vfs/vfs/c/8ec74f7820ca
diff mbox series

Patch

diff --git a/fs/inode.c b/fs/inode.c
index 471ae4a31549..6b3ff38df7f7 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1239,16 +1239,15 @@  EXPORT_SYMBOL(unlock_two_nondirectories);
  * @data:	opaque data pointer to pass to @test and @set
  *
  * Search for the inode specified by @hashval and @data in the inode cache,
- * and if present it is return it with an increased reference count. This is
- * a variant of iget5_locked() for callers that don't want to fail on memory
- * allocation of inode.
+ * and if present return it with an increased reference count. This is a
+ * variant of iget5_locked() that doesn't allocate an inode.
  *
- * If the inode is not in cache, insert the pre-allocated inode to cache and
+ * If the inode is not present in the cache, insert the pre-allocated inode and
  * return it locked, hashed, and with the I_NEW flag set. The file system gets
  * to fill it in before unlocking it via unlock_new_inode().
  *
- * Note both @test and @set are called with the inode_hash_lock held, so can't
- * sleep.
+ * Note that both @test and @set are called with the inode_hash_lock held, so
+ * they can't sleep.
  */
 struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
 			    int (*test)(struct inode *, void *),
@@ -1312,16 +1311,16 @@  EXPORT_SYMBOL(inode_insert5);
  * @data:	opaque data pointer to pass to @test and @set
  *
  * Search for the inode specified by @hashval and @data in the inode cache,
- * and if present it is return it with an increased reference count. This is
- * a generalized version of iget_locked() for file systems where the inode
+ * and if present return it with an increased reference count. This is a
+ * generalized version of iget_locked() for file systems where the inode
  * number is not sufficient for unique identification of an inode.
  *
- * If the inode is not in cache, allocate a new inode and return it locked,
- * hashed, and with the I_NEW flag set. The file system gets to fill it in
- * before unlocking it via unlock_new_inode().
+ * If the inode is not present in the cache, allocate and insert a new inode
+ * and return it locked, hashed, and with the I_NEW flag set. The file system
+ * gets to fill it in before unlocking it via unlock_new_inode().
  *
- * Note both @test and @set are called with the inode_hash_lock held, so can't
- * sleep.
+ * Note that both @test and @set are called with the inode_hash_lock held, so
+ * they can't sleep.
  */
 struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
 		int (*test)(struct inode *, void *),