• J
    ext4: avoid panic during forced reboot · de21c063
    Jan Kara 提交于
    mainline inclusion
    from mainline-5.1-rc2
    commit 1dc1097ff60e4105216da7cd0aa99032b039a994
    category: bugfix
    bugzilla: 13106
    CVE: NA
    
    -------------------------------------------------
    
    When admin calls "reboot -f" - i.e., does a hard system reboot by
    directly calling reboot(2) - ext4 filesystem mounted with errors=panic
    can panic the system. This happens because the underlying device gets
    disabled without unmounting the filesystem and thus some syscall running
    in parallel to reboot(2) can result in the filesystem getting IO errors.
    
    This is somewhat surprising to the users so try improve the behavior by
    switching to errors=remount-ro behavior when the system is running
    reboot(2).
    Signed-off-by: NJan Kara <jack@suse.cz>
    Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
    Signed-off-by: Nluojiajun <luojiajun3@huawei.com>
    Reviewed-by: Nyangerkun <yangerkun@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    de21c063
super.c 171.9 KB