]> git.baikalelectronics.ru Git - kernel.git/commit
fs/9p: fix readdir()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Apr 2015 09:55:14 +0000 (11:55 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 24 Apr 2015 19:45:03 +0000 (15:45 -0400)
commit5aa86cdfa42d2b1109a81544f2d8d43827c1efdd
tree1bb64839f3aa1ccff5e694a405cb9e2d4a344ba7
parent517e003559e078dad833b72c1aa2cb7d72786931
fs/9p: fix readdir()

Al Viro's IOV changes broke 9p readdir() because the new code
didn't abort the read when it returned nothing. The original
code checked if the combined error/length was <= 0 but in the
new code that accidentally got changed to just an error check.

Add back the return from the function when nothing is read.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 4bf5c1eccd3e ("9p: switch p9_client_read() to passing struct iov_iter *")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_dir.c