• Jan Glauber's avatar
    md: Fix missing unused status line of /proc/mdstat · 7abfabaf
    Jan Glauber authored
    Reading /proc/mdstat with a read buffer size that would not
    fit the unused status line in the first read will skip this
    line from the output.
    
    So 'dd if=/proc/mdstat bs=64 2>/dev/null' will not print something
    like: unused devices: <none>
    
    Don't return NULL immediately in start() for v=2 but call
    show() once to print the status line also for multiple reads.
    
    Cc: stable@vger.kernel.org
    Fixes: 1f4aace6 ("fs/seq_file.c: simplify seq_file iteration code and interface")
    Signed-off-by: default avatarJan Glauber <jglauber@digitalocean.com>
    Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
    7abfabaf
md.c 258 KB