srv/vfs: return after checking old fd's validity
commit52b44c63605c069ff1cbdf64f6b8e19bdeefeb2b
authorWang Jianjian <wangjianjian3@huawei.com>
Sat, 23 Feb 2019 06:20:33 +0000 (23 14:20 +0800)
committerJakub Jermar <jakub@jermar.eu>
Sat, 23 Feb 2019 23:01:31 +0000 (24 00:01 +0100)
treea2353b341523efaedd672e47e4d06b3eda5c8efc
parentca0e838006b1e44ee4570c6851ffbd7a5a132165
srv/vfs: return after checking old fd's validity

It's possible for a user to call vfs_clone with invalid fds,
both the old and new ones when they are same. And if it's the case,
we should check its validity or user maybe got a invalid one.

Signed-off-by: Wang Jianjian <wangjianjian3@huawei.com>
uspace/srv/vfs/vfs_ops.c