2021-03-18 14:33:34

by Xiaofeng Cao

[permalink] [raw]
Subject: [PATCH] fs/dcache: fix typos and sentence disorder

change 'sould' to 'should'
change 'colocated' to 'collocated'
change 'talke' to 'take'
reorganize sentence

Signed-off-by: Xiaofeng Cao <[email protected]>
---
fs/dcache.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 7d24ff7eb206..99a58676f478 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -741,7 +741,7 @@ static inline bool fast_dput(struct dentry *dentry)
unsigned int d_flags;

/*
- * If we have a d_op->d_delete() operation, we sould not
+ * If we have a d_op->d_delete() operation, we should not
* let the dentry count go to zero, so use "put_or_lock".
*/
if (unlikely(dentry->d_flags & DCACHE_OP_DELETE))
@@ -1053,7 +1053,7 @@ struct dentry *d_find_alias_rcu(struct inode *inode)
struct dentry *de = NULL;

spin_lock(&inode->i_lock);
- // ->i_dentry and ->i_rcu are colocated, but the latter won't be
+ // ->i_dentry and ->i_rcu are collocated, but the latter won't be
// used without having I_FREEING set, which means no aliases left
if (likely(!(inode->i_state & I_FREEING) && !hlist_empty(l))) {
if (S_ISDIR(inode->i_mode)) {
@@ -1297,7 +1297,7 @@ void shrink_dcache_sb(struct super_block *sb)
EXPORT_SYMBOL(shrink_dcache_sb);

/**
- * enum d_walk_ret - action to talke during tree walk
+ * enum d_walk_ret - action to take during tree walk
* @D_WALK_CONTINUE: contrinue walk
* @D_WALK_QUIT: quit walk
* @D_WALK_NORETRY: quit when retry is needed
@@ -2156,8 +2156,8 @@ EXPORT_SYMBOL(d_obtain_alias);
*
* On successful return, the reference to the inode has been transferred
* to the dentry. In case of an error the reference on the inode is
- * released. A %NULL or IS_ERR inode may be passed in and will be the
- * error will be propagate to the return value, with a %NULL @inode
+ * released. A %NULL or IS_ERR inode may be passed in and the error will
+ * be propagated to the return value, with a %NULL @inode
* replaced by ERR_PTR(-ESTALE).
*/
struct dentry *d_obtain_root(struct inode *inode)
--
2.25.1


2021-03-18 15:05:02

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH] fs/dcache: fix typos and sentence disorder

On Thu, Mar 18, 2021 at 10:31:53PM +0800, Xiaofeng Cao wrote:
> change 'sould' to 'should'
> change 'colocated' to 'collocated'

uh. collocated is incorrect. colocated is correct.
https://www.merriam-webster.com/dictionary/colocate
https://www.merriam-webster.com/dictionary/collocate

The other changes are correct.

2021-03-18 16:42:16

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] fs/dcache: fix typos and sentence disorder

On Thu, Mar 18, 2021 at 03:00:20PM +0000, Matthew Wilcox wrote:
> On Thu, Mar 18, 2021 at 10:31:53PM +0800, Xiaofeng Cao wrote:
> > change 'sould' to 'should'
> > change 'colocated' to 'collocated'
>
> uh. collocated is incorrect. colocated is correct.
> https://www.merriam-webster.com/dictionary/colocate
> https://www.merriam-webster.com/dictionary/collocate

A bit more condensed variant: these two are both derived from
con- + loco, but have different meanings -
colocated: occupying the same place
collocated: sitting next to each other

In this case it's very much the former - the point of comment is that
the fields in question share the same memory location, but we are
guaranteed that any dentry we find in the alias list of an inode will
have that location used for ->i_dentry.

"co-located" would probably work better there.

PS: history of that word pair is amusing. Both are (English) past participles,
of co-locate and collocate resp. The former had the (Latin) prefix applied in
English to borrowing from Latin (co-locate < locate < locatus) , the latter
is straight borrowing (collocate < collocatus). Incidentally, in both cases
the borrowed form had already been a past participle (of loco and
colloco) resp. And colloco had the same prefix (com-/con-/co-) applied
in Latin, with regular assimilation of -nl- to -ll-. But at that stage
the meaning of the verb had been closer to "put in place" than to
"be in place", so that gave "put next to each other" instead of "share
the place". Shift towards "be found next to each other" happened long after
the prefix had been applied...

2021-03-18 16:54:20

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH] fs/dcache: fix typos and sentence disorder

On Thu, Mar 18, 2021 at 04:35:34PM +0000, Al Viro wrote:
> On Thu, Mar 18, 2021 at 03:00:20PM +0000, Matthew Wilcox wrote:
> > On Thu, Mar 18, 2021 at 10:31:53PM +0800, Xiaofeng Cao wrote:
> > > change 'sould' to 'should'
> > > change 'colocated' to 'collocated'
> >
> > uh. collocated is incorrect. colocated is correct.
> > https://www.merriam-webster.com/dictionary/colocate
> > https://www.merriam-webster.com/dictionary/collocate
>
> A bit more condensed variant: these two are both derived from
> con- + loco, but have different meanings -
> colocated: occupying the same place
> collocated: sitting next to each other
>
> In this case it's very much the former - the point of comment is that
> the fields in question share the same memory location, but we are
> guaranteed that any dentry we find in the alias list of an inode will
> have that location used for ->i_dentry.
>
> "co-located" would probably work better there.
>
> PS: history of that word pair is amusing. Both are (English) past participles,
> of co-locate and collocate resp. The former had the (Latin) prefix applied in
> English to borrowing from Latin (co-locate < locate < locatus) , the latter
> is straight borrowing (collocate < collocatus). Incidentally, in both cases
> the borrowed form had already been a past participle (of loco and
> colloco) resp. And colloco had the same prefix (com-/con-/co-) applied
> in Latin, with regular assimilation of -nl- to -ll-. But at that stage
> the meaning of the verb had been closer to "put in place" than to
> "be in place", so that gave "put next to each other" instead of "share
> the place". Shift towards "be found next to each other" happened long after
> the prefix had been applied...

(Flashback to my latin exams. The only thing that is missing is
complete confusion about nested subordinate clauses... ;))