From: Steve French <smfrench@gmail.com>
To: Qiujun Huang <hqjagain@gmail.com>
Cc: Steve French <sfrench@samba.org>,
CIFS <linux-cifs@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/cifs/cifsacl: fix sid_to_id
Date: Tue, 3 Mar 2020 14:13:39 -0600 [thread overview]
Message-ID: <CAH2r5mv2VrSBT_MvUNjd=h354v=29htRQdLSEZi+pDtdggNfoQ@mail.gmail.com> (raw)
In-Reply-To: <1583250197-10786-1-git-send-email-hqjagain@gmail.com>
Doesn't rc = 0 have to be set earlier (preferably in the declaration
on line 345)?
since line 392 does
goto got_valid_id;
which appears to leave rc unitialized with your change
On Tue, Mar 3, 2020 at 9:56 AM Qiujun Huang <hqjagain@gmail.com> wrote:
>
> 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
>
--
Thanks,
Steve
next prev parent reply other threads:[~2020-03-03 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 15:43 [PATCH] fs/cifs/cifsacl: fix sid_to_id Qiujun Huang
2020-03-03 20:13 ` Steve French [this message]
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='CAH2r5mv2VrSBT_MvUNjd=h354v=29htRQdLSEZi+pDtdggNfoQ@mail.gmail.com' \
--to=smfrench@gmail.com \
--cc=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;
as well as URLs for NNTP newsgroup(s).