* [PATCH] fs: assert ->i_lock held in __iget()
@ 2025-09-30 23:53 Mateusz Guzik
2025-10-01 11:54 ` Jan Kara
2025-10-06 10:56 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Guzik @ 2025-09-30 23:53 UTC (permalink / raw)
To: brauner; +Cc: viro, jack, linux-kernel, linux-fsdevel, Mateusz Guzik
Also remove the now redundant comment.
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
verified this booted with ext4 on root, no splats
include/linux/fs.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9e9d7c757efe..4c773c4ee7aa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3368,11 +3368,9 @@ static inline bool is_zero_ino(ino_t ino)
return (u32)ino == 0;
}
-/*
- * inode->i_lock must be held
- */
static inline void __iget(struct inode *inode)
{
+ lockdep_assert_held(&inode->i_lock);
atomic_inc(&inode->i_count);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] fs: assert ->i_lock held in __iget()
2025-09-30 23:53 [PATCH] fs: assert ->i_lock held in __iget() Mateusz Guzik
@ 2025-10-01 11:54 ` Jan Kara
2025-10-06 10:56 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-10-01 11:54 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: brauner, viro, jack, linux-kernel, linux-fsdevel
On Wed 01-10-25 01:53:14, Mateusz Guzik wrote:
> Also remove the now redundant comment.
>
> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
>
> verified this booted with ext4 on root, no splats
>
> include/linux/fs.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 9e9d7c757efe..4c773c4ee7aa 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -3368,11 +3368,9 @@ static inline bool is_zero_ino(ino_t ino)
> return (u32)ino == 0;
> }
>
> -/*
> - * inode->i_lock must be held
> - */
> static inline void __iget(struct inode *inode)
> {
> + lockdep_assert_held(&inode->i_lock);
> atomic_inc(&inode->i_count);
> }
>
> --
> 2.34.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] fs: assert ->i_lock held in __iget()
2025-09-30 23:53 [PATCH] fs: assert ->i_lock held in __iget() Mateusz Guzik
2025-10-01 11:54 ` Jan Kara
@ 2025-10-06 10:56 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-10-06 10:56 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: Christian Brauner, viro, jack, linux-kernel, linux-fsdevel
On Wed, 01 Oct 2025 01:53:14 +0200, Mateusz Guzik wrote:
> Also remove the now redundant comment.
>
>
Applied to the vfs-6.19.inode branch of the vfs/vfs.git tree.
Patches in the vfs-6.19.inode 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-6.19.inode
[1/1] fs: assert ->i_lock held in __iget()
https://git.kernel.org/vfs/vfs/c/0cb93842ce06
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-06 10:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30 23:53 [PATCH] fs: assert ->i_lock held in __iget() Mateusz Guzik
2025-10-01 11:54 ` Jan Kara
2025-10-06 10:56 ` 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).