mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qiujun Huang <hqjagain@gmail.com>
To: sfrench@samba.org
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Qiujun Huang <hqjagain@gmail.com>
Subject: [PATCH] fs/cifs/cifsacl: fix sid_to_id
Date: Tue,  3 Mar 2020 23:43:17 +0800	[thread overview]
Message-ID: <1583250197-10786-1-git-send-email-hqjagain@gmail.com> (raw)

fix it to return the errcode.

Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
---
 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


             reply	other threads:[~2020-03-03 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 15:43 Qiujun Huang [this message]
2020-03-03 20:13 ` Steve French
2020-03-03 23:13   ` Qiujun Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583250197-10786-1-git-send-email-hqjagain@gmail.com \
    --to=hqjagain@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®