mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
md: Fix missing unused status line of /proc/mdstat
commit7abfabaf5fupstream. 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:1f4aace60b("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b70b7ec500
commit
0035a47045
|
|
@ -8187,7 +8187,11 @@ static void *md_seq_start(struct seq_file *seq, loff_t *pos)
|
||||||
loff_t l = *pos;
|
loff_t l = *pos;
|
||||||
struct mddev *mddev;
|
struct mddev *mddev;
|
||||||
|
|
||||||
if (l >= 0x10000)
|
if (l == 0x10000) {
|
||||||
|
++*pos;
|
||||||
|
return (void *)2;
|
||||||
|
}
|
||||||
|
if (l > 0x10000)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!l--)
|
if (!l--)
|
||||||
/* header */
|
/* header */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user