summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorLi Chen <me@linux.beauty>2026-05-15 12:18:24 +0300
committerTheodore Ts'o <tytso@mit.edu>2026-06-03 17:26:35 +0300
commit2b9b216628fd9352f9c791701c8990d05736aa90 (patch)
treedb5f77ee95a2729d9997940adfc05ce37378a6bd /include/linux/timerqueue.h
parentb3060e96533dc3157fc6d3d45dc19927c566977b (diff)
downloadlinux-2b9b216628fd9352f9c791701c8990d05736aa90.tar.xz
ext4: fast commit: avoid self-deadlock in inode snapshotting
ext4_fc_snapshot_inodes() used igrab()/iput() to pin inodes while building commit-time snapshots. With ext4_fc_del() waiting for EXT4_STATE_FC_COMMITTING, iput() can trigger ext4_clear_inode()->ext4_fc_del() in the commit thread and deadlock waiting for the fast commit to finish. ext4_fc_del() also has to re-check EXT4_STATE_FC_COMMITTING after waiting on EXT4_STATE_FC_FLUSHING_DATA. The commit thread clears FLUSHING_DATA before it sets COMMITTING, so a waiter woken from the flush wait must not delete the inode based on an old COMMITTING check. Avoid taking extra references. Collect inode pointers under s_fc_lock and rely on EXT4_STATE_FC_COMMITTING to pin inodes until ext4_fc_cleanup() clears the bit. Also set EXT4_STATE_FC_COMMITTING for create-only inodes referenced from the dentry update queue, and wake up waiters when ext4_fc_cleanup() clears the bit. Signed-off-by: Li Chen <chenl311@chinatelecom.cn> Link: https://patch.msgid.link/20260515091829.194810-5-me@linux.beauty Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions