diff options
| author | Jan Kara <jack@suse.cz> | 2026-03-26 10:54:02 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-03-26 15:03:27 +0100 |
| commit | ba31a330b4c191c44abc158e8d9682705e8fc1dd (patch) | |
| tree | 1ab2ef98b50faf4dccd0e36e8e16369afe228177 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 2cbfeb4c8a43783e697d51f70f6246bdb2fbe0a4 (diff) | |
fs: Remove inode lock from __generic_file_fsync()
Inode lock in __generic_file_fsync() protects sync_mapping_buffers() and
sync_inode_metadata() calls. Neither sync_mapping_buffers() nor
sync_inode_metadata() themselves need the protection by inode_lock and
both metadata buffer head writeback and inode writeback can happen
without inode lock (either in case of background writeback or sync(2)
calls). The only protection inode_lock can possibly provide is that
write(2) or other inode modifying calls cannot happen in the middle of
bh+inode writeout and thus result in writeout of inconsistent metadata.
However if writes and fsyncs race, background writeback can submit
inconsistent metadata just after fsync completed even with inode_lock
protecting fsync so this seems moot as well. So let's remove the
apparently pointless inode_lock protection.
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260326095354.16340-50-jack@suse.cz
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
