• Jaegeuk Kim's avatar
    f2fs: fix deadlock in add_link failure · c92737ce
    Jaegeuk Kim authored
    mkdir                        sync_dirty_inode
     - init_inode_metadata
       - lock_page(node)
       - make_empty_dir
                                 - filemap_fdatawrite()
                                  - do_writepages
                                  - lock_page(data)
                                  - write_page(data)
                                   - lock_page(node)
       - f2fs_init_acl
        - error
       - truncate_inode_pages
        - lock_page(data)
    
    So, we don't need to truncate data pages in this error case, which will
    be done by f2fs_evict_inode.
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    c92737ce
dir.c 21.3 KB