Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp888228yba; Thu, 18 Apr 2019 11:14:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRFWwjAu1P6YM+fDKMMKGRTdg02EBcxsN+AjcM2BTPJU8jWP3fmlG4qa4XsgyC9y1OYFmw X-Received: by 2002:a65:4482:: with SMTP id l2mr6498072pgq.362.1555611275313; Thu, 18 Apr 2019 11:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611275; cv=none; d=google.com; s=arc-20160816; b=EOog8/fJHEwso7mbDUHtkH6jdu6e5V6+iQHMKfFxLCUqlnh7IUpJhY+xpB+4LPe9o9 otuKHYwatoW/HMao/uvaK4npcXCfk0rtTEeivwQ8VIZKZ3OvZdOVYS12q2xugQIBnMEP LK4zYwGQO2kPJm9jD2xrAvVsdf9m/CsE5JPe8rH6PsLVccuy0UBx68zBWSuPpvarvN7d 4ld3cnw5zJLGOMDVNc5fs3isaO3UazHBcfmugM+ked87/MKrIuehwQLza4cMythFMrB7 X8dNp2EPMMkWia/W8FgYctIBjASBosVlh/HZ7S6LycwK2nagKSbQK3gpJqBXVvpRH622 66qw== 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=G2qoQLEAM13xJvBnT2/mWG3GArGF+1ON9ygbpztTkXI=; b=01hZZ32n1RSdNDb0uVwekawBUD5bQg+3eBuHsIz3QGyi18dcJRHunqSama2kZpoCcY LtWsSJ6pUFoEytZlO2h98CpkGjYIH5T3DsjHdaWwHNSfFNT7cjSHI0hGzORA6wjSecu0 MugSorZE3ry3mmMTl1PQomcovH6oyYrzyqKAQsrsNVWsOmb8aWLvO4x0lan0CXcmboLT 5O1be5Fw9FZpSTM1zL7OrupFDNH6i706ij9qeWmdpPmsBF8Mr/5wUTbrLT+Ot91Td3bU sCnmRe1clqDTOX4bUQ5PCwVOHoP1thhSCcSL29qvrKqyrRzFI5NkJLHkmrKG3/Cv2cvK rnWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L6kEr2bW; 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 q25si2360955pgv.534.2019.04.18.11.14.20; Thu, 18 Apr 2019 11:14:35 -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=L6kEr2bW; 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 S2404335AbfDRSMn (ORCPT + 99 others); Thu, 18 Apr 2019 14:12:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403806AbfDRSMl (ORCPT ); Thu, 18 Apr 2019 14:12:41 -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 24A0E206B6; Thu, 18 Apr 2019 18:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555611160; bh=K6aRbgcpuqt14CJ/rw0LrBLNI5faPvMEkzPdAxcyggA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6kEr2bW7LM9UBj5cy+bfNHphZPxVsCYFoJY5P1GQY7Yz5NrHcXKADE627+30Nm5x yURwZ5nS4ulFD7PRrzp8HurG6YkpgGGCirgVxGbTQRis8PjUtWNzonhQ2VxlAJhsIR kP+DgwZ2cLUXfH7pmyenEjYdubJTySRFeLmlz8GI= 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 5.0 64/93] fix incorrect error code mapping for OBJECTID_NOT_FOUND Date: Thu, 18 Apr 2019 19:57:42 +0200 Message-Id: <20190418160443.857691398@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160436.781762249@linuxfoundation.org> References: <20190418160436.781762249@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 924269cec135..e32c264e3adb 100644 --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c @@ -1036,7 +1036,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