• Jan Kara's avatar
    ext4: move unlocked dio protection from ext4_alloc_file_blocks() · 17048e8a
    Jan Kara authored
    Currently ext4_alloc_file_blocks() was handling protection against
    unlocked DIO. However we now need to sometimes call it under i_mmap_sem
    and sometimes not and DIO protection ranks above it (although strictly
    speaking this cannot currently create any deadlocks). Also
    ext4_zero_range() was actually getting & releasing unlocked DIO
    protection twice in some cases. Luckily it didn't introduce any real bug
    but it was a land mine waiting to be stepped on.  So move DIO protection
    out from ext4_alloc_file_blocks() into the two callsites.
    Signed-off-by: default avatarJan Kara <jack@suse.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    17048e8a
extents.c 163 KB