commit | 7d84d1b9af6366aa9df1b523bdb7e002372e38d0 | [log] [tgz] |
---|---|---|
author | Christian Brauner <brauner@kernel.org> | Sun Aug 06 14:49:35 2023 +0200 |
committer | Christian Brauner <brauner@kernel.org> | Sun Aug 06 15:08:36 2023 +0200 |
tree | 450616a5bc325b21b528fa6928294e69f8ffe733 | |
parent | 3e3271549670783be20e233a2b78a87a0b04c715 [diff] |
fs: rely on ->iterate_shared to determine f_pos locking Now that we removed ->iterate we don't need to check for either ->iterate or ->iterate_shared in file_needs_f_pos_lock(). Simply check for ->iterate_shared instead. This will tell us whether we need to unconditionally take the lock. Not just does it allow us to avoid checking f_inode's mode it also actually clearly shows that we're locking because of readdir. Signed-off-by: Christian Brauner <brauner@kernel.org>