fs: constify inode argument of inode_state_read_once()
PATCH 1/1 fs: constify inode argument of inode_state_read_once()
Constify inode parameter so that callers can pass const inode. Callers do not need a change.
---
Notes:
I will have a user with const inode in fsverity
https://lore.kernel.org/fsverity/[email protected]/
include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/fs.h +1 -1
@@ -877,7 +877,7 @@ struct inode {* * We hide all of it behind helpers so that we can validate consumers. */ -static inline enum inode_state_flags_enum inode_state_read_once (struct inode *inode) +static inline enum inode_state_flags_enum inode_state_read_once (const struct inode *inode) {return READ_ONCE (inode->i_state.__state); }
Signature · 1 line
2.54.0
Quoted 4 lines · Andrey Albershteyn
Constify inode parameter so that callers can pass const inode. Callers do not need a change.
Signed-off-by Andrey Albershteyn <[email protected]>
Fine by me. Feel free to add:
Honza
Quoted 25 lines
---
Notes:
I will have a user with const inode in fsverity
https://lore.kernel.org/fsverity/[email protected]/include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/fs.h +1
-1@@ -877,7 +877,7 @@ struct inode {* * We hide all of it behind helpers so that we can validate consumers. */ -static inline enum inode_state_flags_enum inode_state_read_once (struct inode *inode) +static inline enum inode_state_flags_enum inode_state_read_once (const struct inode *inode) {return READ_ONCE (inode->i_state.__state); }Signature · 1 line
2.54.0
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 5 lines · Andrey Albershteyn
Constify inode parameter so that callers can pass const inode. Callers do not need a change.
Signed-off-by Andrey Albershteyn <[email protected]>---
Looks good:
Quoted 3 lines
Notes:
I will have a user with const inode in fsverity
https://lore.kernel.org/fsverity/[email protected]/
You probably want to include this patch in that series to reduce the amount of dependency tracking you have to do..
Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Andrey Albershteyn
Constify inode parameter so that callers can pass const inode. Callers do not need a change.
Signed-off-by Andrey Albershteyn <[email protected]>---
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Thanks!
Quoted 7 lines
Quoted 4 lines
Notes:
I will have a user with const inode in fsverity
https://lore.kernel.org/fsverity/[email protected]/You probably want to include this patch in that series to reduce the amount of dependency tracking you have to do..
Yeah, make sense, I will include it as a part of the series then
Signature · 1 line
- Andrey