Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp896097yba; Thu, 18 Apr 2019 11:22:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyXz476RycJi97y/X1kiRtD6b0OPo+dLocroOhm28pclNVbt0KM88mWv39FWcOFdBEUfk8 X-Received: by 2002:a17:902:848d:: with SMTP id c13mr96433482plo.279.1555611775232; Thu, 18 Apr 2019 11:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611775; cv=none; d=google.com; s=arc-20160816; b=LhgwKUTTuPOvSd/xwhHdD1aOPrsNsNLPwJNTRVBPvSBNIFZ6hCzlyvGIdc7jxB+vOz GXpJJF0U57Kz6vLBAv5TMiGoxcz4HcOkdjPvwqdWBnA9Xj9LCHspMD0DxShNra7H/2xm J1vamX06JZ9rdMEIPgSipA57oDGqMCL/JHNgjnPXToRqSfsCX+Ds1inqgqT+y7CK+CUC oKsD+0hDQg7xuSSzKWrtmAY2JtAAe7IDVCU0+0U+aPX8+41kHN3ukeMXoCQN/KAXt3DX dWxn+JqXLp7nOmJKFg5TzxR58oaeOKabCOK0hT0KLJvbNb955/oMX/cUhVwp+s/3W1Kx bs4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J39dvuFJdXmRXwpR50ZyTbtkPYGaDlvunjDCZaHF68M=; b=l5BiLs74xvHchpeW0ZmXX+cpJ9QKov/IGk8xHVd5MfATWhX1wjySEqqVpbxbziUfXH rcQHW2OTcffLFFcWV1ph+ErtPmBPpqtQKGk//oim5T+8fyxGQAxej9sPqGX/++LbnIzS +5VgfikKzuIU/dmr5UrZbwwVfcmjcW4KtE99d5TiQ708D17TI2OM9UdXdd8fWcZSDbtK g8VCev43dmsvoatMmXh2eM27Z0yzsDE6pcYbp/cpZmq877Gck0FmXOnmRJZbumpsbXxr Wuuavdy7IdHmXt4nXTk5Q32HZ/+yByANBDuJqmyBolh8IvysdoNr4WRS90eQt90tUzaJ jhcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bK6TG9EF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s83si2477324pgs.420.2019.04.18.11.22.39; Thu, 18 Apr 2019 11:22:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bK6TG9EF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391577AbfDRSJM (ORCPT + 99 others); Thu, 18 Apr 2019 14:09:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:40690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391843AbfDRSJK (ORCPT ); Thu, 18 Apr 2019 14:09:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7BA6206B6; Thu, 18 Apr 2019 18:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610949; bh=IubD04QLa48Yf/kJXtC8a+ljo4KCWrMVa/iTQBVBW7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bK6TG9EFMgYyttD6Gmzb2SQL++rQP6lIJ8ggCCN8GeRH8AEtGzK9TAAWRB+AQNrF8 tjq+DNK4ifas3jIWRwkr6cBZua4fV6wsDbUCbQtesOnH2WYPN7smgkhiFXrwclXPKg i4HvdSsRaTGqUQoG0LDQeE6DjRRj1do/EB0HVOdo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Amir Goldstein , Sasha Levin Subject: [PATCH 4.9 26/50] fix incorrect error code mapping for OBJECTID_NOT_FOUND Date: Thu, 18 Apr 2019 19:57:37 +0200 Message-Id: <20190418160426.004212911@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160422.455656724@linuxfoundation.org> References: <20190418160422.455656724@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 85f9987b236cf46e06ffdb5c225cf1f3c0acb789 ] It was mapped to EIO which can be confusing when user space queries for an object GUID for an object for which the server file system doesn't support (or hasn't saved one). As Amir Goldstein suggested this is similar to ENOATTR (equivalently ENODATA in Linux errno definitions) so changing NT STATUS code mapping for OBJECTID_NOT_FOUND to ENODATA. Signed-off-by: Steve French CC: Amir Goldstein Signed-off-by: Sasha Levin --- fs/cifs/smb2maperror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c index 98c25b969ab8..7e93d5706bf6 100644 --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c @@ -1034,7 +1034,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = { {STATUS_UNFINISHED_CONTEXT_DELETED, -EIO, "STATUS_UNFINISHED_CONTEXT_DELETED"}, {STATUS_NO_TGT_REPLY, -EIO, "STATUS_NO_TGT_REPLY"}, - {STATUS_OBJECTID_NOT_FOUND, -EIO, "STATUS_OBJECTID_NOT_FOUND"}, + /* Note that ENOATTTR and ENODATA are the same errno */ + {STATUS_OBJECTID_NOT_FOUND, -ENODATA, "STATUS_OBJECTID_NOT_FOUND"}, {STATUS_NO_IP_ADDRESSES, -EIO, "STATUS_NO_IP_ADDRESSES"}, {STATUS_WRONG_CREDENTIAL_HANDLE, -EIO, "STATUS_WRONG_CREDENTIAL_HANDLE"}, -- 2.19.1