diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-11-09 17:51:18 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-11-11 11:59:10 +0100 |
| commit | d25c14b2d79e4e8292b19041efd1aae4057bf383 (patch) | |
| tree | 7bfa1b40a333c67e461602028e918cce28e9b3c9 /include/linux/workqueue_api.h | |
| parent | c2e595a57aba6aa166053776969f31cc510b3e71 (diff) | |
ext4: use sb_find_get_block_nonatomic() in ext4_get_inode_loc_noio()
ext4_get_inode_loc_noio() looks the inode table block up with
sb_find_get_block(). That's the atomic lookup. It serializes against
try_to_free_buffers() with i_private_lock instead of the folio lock and
gives up if the folio is being migrated. So it can report the block as
not cached while it is.
For ext4_fc_snapshot_inode() that only means falling back to a full
commit. But ext4_sync_inode_metadata() is going to use
ext4_get_inode_loc_noio() to find the inode block that fsync() has to
write out and there a dirty block must not be skipped.
ext4_fc_snapshot_inode() is the only caller and it can sleep. It runs
under jbd2_journal_lock_updates() and allocates the snapshot with
GFP_NOFS. So use sb_find_get_block_nonatomic() which takes the folio
lock and waits for the migration instead.
Suggested-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org # v7.3
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20261109-work-inode-metadata_writeback-v3-3-91ac6c024018@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
