compat_ioctl: fix FIONREAD on devices
My final cleanup patch for sys_compat_ioctl() introduced a regression on the FIONREAD ioctl command, which is used for both regular and special files, but only works on regular files after my patch, as I had missed the warning that Al Viro put into a comment right above it. Change it back so it can work on any file again by moving the implementation to do_vfs_ioctl() instead. Fixes: 77b90401 ("compat_ioctl: simplify the implementation") Reported-and-tested-by: NChristian Zigotzky <chzigotzky@xenosoft.de> Reported-and-tested-by: Nyouling257 <youling257@gmail.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Showing
想要评论请 注册 或 登录