mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
Coccinelle-based conversion to use ->i_state accessors
All places were patched by coccinelle with the default expecting that ->i_lock is held, afterwards entries got fixed up by hand to use unlocked variants as needed. The script: @@ expression inode, flags; @@ - inode->i_state & flags + inode_state_read(inode) & flags @@ expression inode, flags; @@ - inode->i_state &= ~flags + inode_state_clear(inode, flags) @@ expression inode, flag1, flag2; @@ - inode->i_state &= ~flag1 & ~flag2 + inode_state_clear(inode, flag1 | flag2) @@ expression inode, flags; @@ - inode->i_state |= flags + inode_state_set(inode, flags) @@ expression inode, flags; @@ - inode->i_state = flags + inode_state_assign(inode, flags) @@ expression inode, flags; @@ - flags = inode->i_state + flags = inode_state_read(inode) @@ expression inode, flags; @@ - READ_ONCE(inode->i_state) & flags + inode_state_read(inode) & flags Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
d8753f788a
commit
b4dbfd8653
66 changed files with 199 additions and 199 deletions
|
|
@ -1296,7 +1296,7 @@ static void hook_sb_delete(struct super_block *const sb)
|
|||
* second call to iput() for the same Landlock object. Also
|
||||
* checks I_NEW because such inode cannot be tied to an object.
|
||||
*/
|
||||
if (inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW)) {
|
||||
if (inode_state_read(inode) & (I_FREEING | I_WILL_FREE | I_NEW)) {
|
||||
spin_unlock(&inode->i_lock);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue