• Tejun Heo's avatar
    floppy: don't use PREPARE_[DELAYED_]WORK · 75ddb38f
    Tejun Heo authored
    PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
    and a nasty surprise in terms of reentrancy guarantee as workqueue
    considers work items to be different if they don't have the same work
    function.
    
    floppy has been multiplexing floppy_work and fd_timer with multiple
    work functions.  Introduce floppy_work_workfn() and fd_timer_workfn()
    which invoke floppy_work_fn and fd_timer_fn respectively and always
    use the two functions as the work functions and update the users to
    set floppy_work_fn and fd_timer_fn instead of overriding work
    functions using PREPARE_[DELAYED_]WORK().
    
    It would probably be best to route this with other related updates
    through the workqueue tree.
    
    Lightly tested using qemu.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
    75ddb38f
floppy.c 118 KB