Skip to content

Commit

Permalink
eventfs: Use SRCU for freeing eventfs_inodes
Browse files Browse the repository at this point in the history
To mirror the SRCU lock held in eventfs_iterate() when iterating over
eventfs inodes, use call_srcu() to free them too.

This was accidentally(?) degraded to RCU in commit 43aa6f9
("eventfs: Get rid of dentry pointers without refcounts").

Cc: Ajay Kaher <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/[email protected]
Fixes: 43aa6f9 ("eventfs: Get rid of dentry pointers without refcounts")
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
  • Loading branch information
minipli-oss authored and rostedt committed Aug 7, 2024
1 parent 12c20c6 commit 8e55643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/tracefs/event_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static void release_ei(struct kref *ref)
entry->release(entry->name, ei->data);
}

call_rcu(&ei->rcu, free_ei_rcu);
call_srcu(&eventfs_srcu, &ei->rcu, free_ei_rcu);
}

static inline void put_ei(struct eventfs_inode *ei)
Expand Down

0 comments on commit 8e55643

Please sign in to comment.