* [PATCH 0/2] 2 cosmetic changes
@ 2023-10-04 11:19 Mateusz Guzik
2023-10-04 11:19 ` [PATCH 1/2] vfs: predict the error in retry_estale as unlikely Mateusz Guzik
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mateusz Guzik @ 2023-10-04 11:19 UTC (permalink / raw)
To: brauner; +Cc: linux-kernel, linux-fsdevel, Mateusz Guzik
both were annoying me for some time, so I'm pushing them out
These patches don't warrant arguing nor pinging in case of no response,
so if you don't like them that's it for the patchset. :)
cheers
Mateusz Guzik (2):
vfs: predict the error in retry_estale as unlikely
vfs: stop counting on gcc not messing with mnt_expiry_mark if not
asked
fs/namespace.c | 4 ++--
include/linux/namei.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] vfs: predict the error in retry_estale as unlikely
2023-10-04 11:19 [PATCH 0/2] 2 cosmetic changes Mateusz Guzik
@ 2023-10-04 11:19 ` Mateusz Guzik
2023-10-04 11:19 ` [PATCH 2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked Mateusz Guzik
2023-10-09 16:14 ` [PATCH 0/2] 2 cosmetic changes Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Mateusz Guzik @ 2023-10-04 11:19 UTC (permalink / raw)
To: brauner; +Cc: linux-kernel, linux-fsdevel, Mateusz Guzik
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
include/linux/namei.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 1463cbda4888..689b16f3031b 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -112,7 +112,7 @@ static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
static inline bool
retry_estale(const long error, const unsigned int flags)
{
- return error == -ESTALE && !(flags & LOOKUP_REVAL);
+ return unlikely(error == -ESTALE && !(flags & LOOKUP_REVAL));
}
#endif /* _LINUX_NAMEI_H */
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked
2023-10-04 11:19 [PATCH 0/2] 2 cosmetic changes Mateusz Guzik
2023-10-04 11:19 ` [PATCH 1/2] vfs: predict the error in retry_estale as unlikely Mateusz Guzik
@ 2023-10-04 11:19 ` Mateusz Guzik
2023-10-09 16:14 ` [PATCH 0/2] 2 cosmetic changes Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Mateusz Guzik @ 2023-10-04 11:19 UTC (permalink / raw)
To: brauner; +Cc: linux-kernel, linux-fsdevel, Mateusz Guzik
So happens it already was not doing it, but there is no need to "hope"
as indicated in the comment.
No changes in generated assembly.
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
fs/namespace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index e157efc54023..d785bcb75111 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1344,9 +1344,9 @@ void mntput(struct vfsmount *mnt)
{
if (mnt) {
struct mount *m = real_mount(mnt);
- /* avoid cacheline pingpong, hope gcc doesn't get "smart" */
+ /* avoid cacheline pingpong */
if (unlikely(m->mnt_expiry_mark))
- m->mnt_expiry_mark = 0;
+ WRITE_ONCE(m->mnt_expiry_mark, 0);
mntput_no_expire(m);
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] 2 cosmetic changes
2023-10-04 11:19 [PATCH 0/2] 2 cosmetic changes Mateusz Guzik
2023-10-04 11:19 ` [PATCH 1/2] vfs: predict the error in retry_estale as unlikely Mateusz Guzik
2023-10-04 11:19 ` [PATCH 2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked Mateusz Guzik
@ 2023-10-09 16:14 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2023-10-09 16:14 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: Christian Brauner, linux-kernel, linux-fsdevel
On Wed, 04 Oct 2023 13:19:14 +0200, Mateusz Guzik wrote:
> both were annoying me for some time, so I'm pushing them out
>
> These patches don't warrant arguing nor pinging in case of no response,
> so if you don't like them that's it for the patchset. :)
>
> cheers
>
> [...]
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/2] vfs: predict the error in retry_estale as unlikely
https://git.kernel.org/vfs/vfs/c/c9f39d6a1486
[2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked
https://git.kernel.org/vfs/vfs/c/5cafd8fed85c
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-09 16:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 11:19 [PATCH 0/2] 2 cosmetic changes Mateusz Guzik
2023-10-04 11:19 ` [PATCH 1/2] vfs: predict the error in retry_estale as unlikely Mateusz Guzik
2023-10-04 11:19 ` [PATCH 2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked Mateusz Guzik
2023-10-09 16:14 ` [PATCH 0/2] 2 cosmetic changes Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).