From 7cb82de3cdf2da0acd6fc3e670c7271ded37e116 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Tue, 30 Mar 2021 12:58:26 +0900 Subject: [PATCH] cifsd: fix error return code in ksmbd_vfs_remove_file() Change -ENOENT error to -EINVAL to response STATUS_INVALID_PARAMETER. Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/cifsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index f93cc55ea153..da44d131e25b 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -596,7 +596,7 @@ int ksmbd_vfs_remove_file(struct ksmbd_work *work, char *name) last = extract_last_component(name); if (!last) - return -ENOENT; + return -EINVAL; if (ksmbd_override_fsids(work)) return -ENOMEM;