]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: fix fileattr op failure
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 18 Feb 2022 10:47:51 +0000 (11:47 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 18 Feb 2022 10:47:51 +0000 (11:47 +0100)
commit5648f26e9117628a6b91ef2ae12ecfdbc00eb7f1
treeb6d8b941ed48b25b693b1a0dc74c2fe7dcaa1d72
parent61541caa89658fea194830baa7a6d9bd537331be
fuse: fix fileattr op failure

The fileattr API conversion broke lsattr on ntfs3g.

Previously the ioctl(... FS_IOC_GETFLAGS) returned an EINVAL error, but
after the conversion the error returned by the fuse filesystem was not
propagated back to the ioctl() system call, resulting in success being
returned with bogus values.

Fix by checking for outarg.result in fuse_priv_ioctl(), just as generic
ioctl code does.

Reported-by: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
Fixes: 96cfe2659e6d ("fuse: convert to fileattr")
Cc: <stable@vger.kernel.org> # v5.13
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/ioctl.c