• Chao Yu's avatar
    f2fs: fix incorrect range->len in f2fs_trim_fs() · 6eae2694
    Chao Yu authored
    generic/260 reported below error:
    
         [+] Default length with start set (should succeed)
         [+] Length beyond the end of fs (should succeed)
         [+] Length beyond the end of fs with start set (should succeed)
        +./tests/generic/260: line 94: [: 18446744073709551615: integer expression expected
        +./tests/generic/260: line 104: [: 18446744073709551615: integer expression expected
         Test done
        ...
    
    In f2fs_trim_fs(), if there is no discard being trimmed, we need to correct
    range->len before return.
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    6eae2694
segment.c 107 KB