Re: [PATCH v1] fs: fix spelling mistakes in comment
From: Mateusz Guzik
Date: Wed May 27 2026 - 05:17:23 EST
On Wed, May 27, 2026 at 11:15:08AM +0800, fffsqian@xxxxxxx wrote:
> From: Qingshuang Fu <fuqingshuang@xxxxxxxxxx>
>
> Fix three spelling errors in the comment for an internal file structure
> allocation function:
> - happend → happened
> - over → exceed (grammatical fix)
> - int → in
>
> Signed-off-by: Qingshuang Fu <fuqingshuang@xxxxxxxxxx>
> ---
> fs/file_table.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/file_table.c b/fs/file_table.c
> index 16e52e7fc2ac..fa06b660f116 100644
> --- a/fs/file_table.c
> +++ b/fs/file_table.c
> @@ -231,13 +231,13 @@ static int init_file(struct file *f, int flags, const struct cred *cred)
> }
>
> /* Find an unused file structure and return a pointer to it.
> - * Returns an error pointer if some error happend e.g. we over file
> + * Returns an error pointer if some error happened e.g. we exceed the file
> * structures limit, run out of memory or operation is not permitted.
> *
> * Be very careful using this. You are responsible for
> * getting write access to any mount that you might assign
> * to this filp, if it is opened for write. If this is not
> - * done, you will imbalance int the mount's writer count
> + * done, you will imbalance in the mount's writer count
> * and a warning at __fput() time.
> */
> struct file *alloc_empty_file(int flags, const struct cred *cred)
If one is to touch this comment block it would be best to sort it out
overall. Or better yet, not just this one but the entirety of the file.
For starters there is a format to follow to document args & return
values, see file_init_path for an example.
That aside even if your changes the comment is definitely wrong from
grammar standpoint, but I don't know English well enough to be confident
I would write a fully correct version.
"e.g." requires a comma ("e.g.,")
That aside "you will imbalance in the mount's writer count" reads way
off to me.
Perhaps this is best left to native speakers.