Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3547286ybf; Tue, 3 Mar 2020 07:56:16 -0800 (PST) X-Google-Smtp-Source: ADFU+vtC5IPo+Qepj5qiE/UipU/flyvCTJ3pCT7PhKLNxA9NahiqC0O2K2EaMqTQrDsEB0Sw8Pd+ X-Received: by 2002:a05:6830:1549:: with SMTP id l9mr3851393otp.236.1583250976072; Tue, 03 Mar 2020 07:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583250976; cv=none; d=google.com; s=arc-20160816; b=VdHD4z8IqrVDxFQoo6qsiTLGn40ejmNb8BPyuavkdT1H7LAauqkG4FC55lXYGEgJN5 sxpzN9jTHjbfoWg6qe618Ev5Ztj4KOiqIJIKTmjLZEAypkeb5QoACmzZdtxL2veRPLqd t3v5YhbORbf9cM0O0SrKuhy+XLdQyobEAbi5e8ALJAQhMLjr4weym2ecHMbDqNbztgwo 1MxILPXrOfsnF14/J2qFnL1bGdawJHklboWH47mgd1e5/bps2WT8+Mxj1YgMxRrWJRj1 0wXd7PrymoCf52bvP281VWjwE7ZRMw+7G2O5288jgPbXgDdFAv7xjzP4mzl4GppMYULO IehQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=yVsYqPYn8VlY/Xr0vLshTuy/KHxsb6yKrL/whDXq2nQ=; b=kLqr03Hly8k7tBXub4Gh1fDXaRxJMJx+eaHcn9rJCgtRkzqmvSvSlvOsAwugLeGxPd WoGKE/P1ddsJ60kGS4yIk97uAdekIBaSFnJOfrc0Az8JpCEUNPZYvoDS+vwu3/yUPrb0 mKRGeB1dDYtBGzwkKAgMQWRzgSCcKmCSLGtIF1zn+WyhCWqtB9LDnzE3oeVSJ7etVsfa B9kDec/pG/NrYY00HBh+LXQh4x36tHR2cZilafnOgFDMoPYX1G6/XiDgfxCd9GhmHWjY WtNeLPAB7evhOpmlPQFMrVOrVEwsx+Z0TeHDvYG/hvHxrMQtHyqnPN2RXa+jD0l+1CKf 2Chg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u63NjWYt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si8527671otk.170.2020.03.03.07.56.04; Tue, 03 Mar 2020 07:56:16 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=u63NjWYt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730105AbgCCPnX (ORCPT + 99 others); Tue, 3 Mar 2020 10:43:23 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44928 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727725AbgCCPnX (ORCPT ); Tue, 3 Mar 2020 10:43:23 -0500 Received: by mail-pg1-f194.google.com with SMTP id a14so1692031pgb.11; Tue, 03 Mar 2020 07:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yVsYqPYn8VlY/Xr0vLshTuy/KHxsb6yKrL/whDXq2nQ=; b=u63NjWYtBbIKnMGnZA3qD99y4hm4ZM8DTS/EiXtc/ljVUruQ6mlWYwg55/jqXlGhMn ECDBhgWH7Wou0JHw6NPNSocMxuA4QPqWJsgGQhhD5IkxY4ETICeRgOl1CacgswX5vsTU 10pzH2cDLtN3ROnRS9DHqUGR8yubxIkbaMC0x4dklbWBGxbyf+k4hFox+D9B+ex6d0qw C4I+Dshd6QFpOU63RwpD8ZFCN5Xq/v3glPJ7gPyc3G5NFtzaqwJH3MXanOtJ6EDAEzQF 2uGCMUqmqG1ViBixVSPucooxJvmI7XFuQQV2BFdt7SFX5RgGQqqohVi+RmU4Pv/DcAR/ dbcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yVsYqPYn8VlY/Xr0vLshTuy/KHxsb6yKrL/whDXq2nQ=; b=HIsXFqUQtaWyCX3eVpifkguju1D7rebFr53Cyh6zAv0gZe+RIQG5RcX8BlhtTydxhY +pHQJ30IODAp8LeMr+oJ36lPBMLmu1FvqTBG3nXBvjp9cmttPgrn4FFMQWdrUWWoz5Fa LPWtSk7l6uRPDZqawaKnVLdXjBMoTc+C7ggQg9msKtRSobmxFzgvMl/W8yqP97bdrzZE BP2hDDVHS16ylaICPW0MJnvmq5x0WbXNNtVyjMHEh1+9kzisD9TwYmGo7VLa8rIIkQBv cAoquImN+XYW+TzcC7Y8BD0marmBXDaH6MsUXE6WKrESEr3EVvLKRcUdjneVa9diLgzZ fFdA== X-Gm-Message-State: ANhLgQ1h2b1Ggz9SfSq9jqAeL23NuZbwsONs/2e4It4sxrCA93PTfefQ 3AwwOx29AFfj7o3bOjjyiZkPhTER X-Received: by 2002:a63:7a1a:: with SMTP id v26mr4604508pgc.152.1583250202039; Tue, 03 Mar 2020 07:43:22 -0800 (PST) Received: from VM_0_35_centos.localdomain ([150.109.62.251]) by smtp.gmail.com with ESMTPSA id 64sm25131037pfd.48.2020.03.03.07.43.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2020 07:43:21 -0800 (PST) From: Qiujun Huang To: sfrench@samba.org Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, Qiujun Huang Subject: [PATCH] fs/cifs/cifsacl: fix sid_to_id Date: Tue, 3 Mar 2020 23:43:17 +0800 Message-Id: <1583250197-10786-1-git-send-email-hqjagain@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix it to return the errcode. Signed-off-by: Qiujun Huang --- fs/cifs/cifsacl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 716574a..a8d2aa8 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -400,6 +400,7 @@ if (!sidstr) return -ENOMEM; + rc = 0; saved_cred = override_creds(root_cred); sidkey = request_key(&cifs_idmap_key_type, sidstr, ""); if (IS_ERR(sidkey)) { @@ -454,7 +455,7 @@ fattr->cf_uid = fuid; else fattr->cf_gid = fgid; - return 0; + return rc; } int -- 1.8.3.1