]> git.baikalelectronics.ru Git - kernel.git/commit
md: Fix missing unused status line of /proc/mdstat
authorJan Glauber <jglauber@digitalocean.com>
Wed, 17 Mar 2021 14:04:39 +0000 (15:04 +0100)
committerSong Liu <songliubraving@fb.com>
Wed, 24 Mar 2021 23:29:07 +0000 (16:29 -0700)
commitb8e2ca25ed4cf2e153425f79dea1d5dda1c7e8b0
tree9ef00a2b56d0fb0a25733dacf10bcd55439940d2
parent2e9557bf1ab7217c1c8681603477933de10ef99b
md: Fix missing unused status line of /proc/mdstat

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: 46cb04d471b6 ("fs/seq_file.c: simplify seq_file iteration code and interface")
Signed-off-by: Jan Glauber <jglauber@digitalocean.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/md.c