提交 f2d67931 编写于 作者: Q Qiujun Huang 提交者: Steve French

fs/cifs: fix gcc warning in sid_to_id

fix warning [-Wunused-but-set-variable] at variable 'rc',
keeping the code readable.
Signed-off-by: NQiujun Huang <hqjagain@gmail.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 0667059d
...@@ -342,7 +342,7 @@ static int ...@@ -342,7 +342,7 @@ static int
sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
struct cifs_fattr *fattr, uint sidtype) struct cifs_fattr *fattr, uint sidtype)
{ {
int rc; int rc = 0;
struct key *sidkey; struct key *sidkey;
char *sidstr; char *sidstr;
const struct cred *saved_cred; const struct cred *saved_cred;
...@@ -450,11 +450,12 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, ...@@ -450,11 +450,12 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
* fails then we just fall back to using the mnt_uid/mnt_gid. * fails then we just fall back to using the mnt_uid/mnt_gid.
*/ */
got_valid_id: got_valid_id:
rc = 0;
if (sidtype == SIDOWNER) if (sidtype == SIDOWNER)
fattr->cf_uid = fuid; fattr->cf_uid = fuid;
else else
fattr->cf_gid = fgid; fattr->cf_gid = fgid;
return 0; return rc;
} }
int int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册