ncpfs: return proper error from NCP_IOC_SETROOT ioctl
authorJan Kara <[email protected]>
Wed, 10 Dec 2014 23:52:22 +0000 (15:52 -0800)
committerLinus Torvalds <[email protected]>
Thu, 11 Dec 2014 01:41:13 +0000 (17:41 -0800)
commita682e9c28cac152e6e54c39efcf046e0c8cfcf63
treeaa6318f6b1ae5ae43471d6dbb47b5982d7ecd758
parent6ef4536e2f19c4dba3637413d73ea00b19764bc0
ncpfs: return proper error from NCP_IOC_SETROOT ioctl

If some error happens in NCP_IOC_SETROOT ioctl, the appropriate error
return value is then (in most cases) just overwritten before we return.
This can result in reporting success to userspace although error happened.

This bug was introduced by commit 2e54eb96e2c8 ("BKL: Remove BKL from
ncpfs").  Propagate the errors correctly.

Coverity id: 1226925.

Fixes: 2e54eb96e2c80 ("BKL: Remove BKL from ncpfs")
Signed-off-by: Jan Kara <[email protected]>
Cc: Petr Vandrovec <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/ncpfs/ioctl.c