• Jan Kara's avatar
    ext2: Call dquot_writeback_dquots() with s_umount held · 65547661
    Jan Kara authored
    ext2_sync_fs() could be called without s_umount semaphore held when
    called through ext2_write_super() from __ext2_write_inode(). This
    function then calls dquot_writeback_dquots() which relies on s_umount to
    be held for protection against other quota operations.
    
    In fact __ext2_write_inode() does not need all the functionality
    ext2_write_super() provides. It is enough to just write the superblock.
    So use ext2_sync_super() instead.
    
    Fixes: 9d1ccbe7Reported-by: default avatarJan Beulich <jbeulich@suse.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    65547661
ext2.h 28.1 KB