diff options
author | Qiujun Huang <hqjagain@gmail.com> | 2020-03-04 15:42:51 +0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-03-22 22:49:09 -0500 |
commit | f2d67931fdfe247e1b3469e24836451f41cc11f7 (patch) | |
tree | 9e102e9d4a7a3740275901a93e224a28e5abd899 /fs/cifs/cifsacl.c | |
parent | 0667059d0b4ad231e7258aa571f28574b313f34f (diff) | |
download | linux-f2d67931fdfe247e1b3469e24836451f41cc11f7.tar.bz2 |
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: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsacl.c')
-rw-r--r-- | fs/cifs/cifsacl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 716574aab3b6..ae421634aa42 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -342,7 +342,7 @@ static int sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, struct cifs_fattr *fattr, uint sidtype) { - int rc; + int rc = 0; struct key *sidkey; char *sidstr; const struct cred *saved_cred; @@ -450,11 +450,12 @@ out_revert_creds: * fails then we just fall back to using the mnt_uid/mnt_gid. */ got_valid_id: + rc = 0; if (sidtype == SIDOWNER) fattr->cf_uid = fuid; else fattr->cf_gid = fgid; - return 0; + return rc; } int |