diff options
author | Wang YanQing <udknight@gmail.com> | 2014-04-03 14:48:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 16:21:05 -0700 |
commit | 8f6c5ffc8987f4f5b5a3e9d557d94bbf3a9bf216 (patch) | |
tree | 79ea014021610d9a6057c070e1208542fd014e33 /fs/nfsd | |
parent | 6af9f7bf3c399e0ab1eee048e13572c6d4e15fe9 (diff) | |
download | op-kernel-dev-8f6c5ffc8987f4f5b5a3e9d557d94bbf3a9bf216.zip op-kernel-dev-8f6c5ffc8987f4f5b5a3e9d557d94bbf3a9bf216.tar.gz |
kernel/groups.c: remove return value of set_groups
After commit 6307f8fee295 ("security: remove dead hook task_setgroups"),
set_groups will always return zero, so we could just remove return value
of set_groups.
This patch reduces code size, and simplfies code to use set_groups,
because we don't need to check its return value any more.
[akpm@linux-foundation.org: remove obsolete claims from set_groups() comment]
Signed-off-by: Wang YanQing <udknight@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/auth.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index 06cddd5..2645be4 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -71,10 +71,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) if (gid_eq(new->fsgid, INVALID_GID)) new->fsgid = exp->ex_anon_gid; - ret = set_groups(new, gi); + set_groups(new, gi); put_group_info(gi); - if (ret < 0) - goto error; if (!uid_eq(new->fsuid, GLOBAL_ROOT_UID)) new->cap_effective = cap_drop_nfsd_set(new->cap_effective); @@ -89,7 +87,6 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) oom: ret = -ENOMEM; -error: abort_creds(new); return ret; } |