• Yan, Zheng's avatar
    ceph: don't call truncate_pagecache in ceph_writepages_start · 6c93df5d
    Yan, Zheng authored
    truncate_pagecache() may decrease inode's reference. This can cause
    deadlock if inode's last reference is dropped and iput_final() wants
    to evict the inode. (evict() calls inode_wait_for_writeback(), which
    waits for ceph_writepages_start() to return).
    
    The fix is use work thead to truncate dirty pages. Also add 'forced
    umount' check to ceph_update_writeable_page(), which prevents new
    pages getting dirty.
    Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
    6c93df5d
mds_client.c 101 KB