diff options
| author | Yi Yang <[email protected]> | 2022-05-10 08:05:33 +0000 |
|---|---|---|
| committer | Max Filippov <[email protected]> | 2022-05-11 09:15:38 +0000 |
| commit | b011946d039d66bbc7102137e98cc67e1356aa87 (patch) | |
| tree | 187e0f9ca53b97149bc795bf9945320ade1b1572 /fs/jbd2/commit.c | |
| parent | xtensa: no need to initialise statics to 0 (diff) | |
| download | kernel-b011946d039d66bbc7102137e98cc67e1356aa87.tar.gz kernel-b011946d039d66bbc7102137e98cc67e1356aa87.zip | |
xtensa/simdisk: fix proc_read_simdisk()
The commit a69755b18774 ("xtensa simdisk: switch to proc_create_data()")
split read operation into two parts, first retrieving the path when it's
non-null and second retrieving the trailing '\n'. However when the path
is non-null the first simple_read_from_buffer updates ppos, and the
second simple_read_from_buffer returns 0 if ppos is greater than 1 (i.e.
almost always). As a result reading from that proc file is almost always
empty.
Fix it by making a temporary copy of the path with the trailing '\n' and
using simple_read_from_buffer on that copy.
Cc: [email protected]
Fixes: a69755b18774 ("xtensa simdisk: switch to proc_create_data()")
Signed-off-by: Yi Yang <[email protected]>
Signed-off-by: Max Filippov <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
