diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:05 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:05 -0500 |
commit | da9592edebceeba1b9301beafe80ec8b9c2db0ce (patch) | |
tree | 00c110cd8ff6d211d76ab4868b6175096a38aad5 /fs/dquot.c | |
parent | 82ab8deda7fef36f067ccdeacc3b3caefc970f89 (diff) |
CRED: Wrap task credential accesses in the filesystem subsystem
Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.
Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r-- | fs/dquot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index 5e95261005b2..c237ccc8581c 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -874,7 +874,7 @@ static inline int need_print_warning(struct dquot *dquot) | |||
874 | 874 | ||
875 | switch (dquot->dq_type) { | 875 | switch (dquot->dq_type) { |
876 | case USRQUOTA: | 876 | case USRQUOTA: |
877 | return current->fsuid == dquot->dq_id; | 877 | return current_fsuid() == dquot->dq_id; |
878 | case GRPQUOTA: | 878 | case GRPQUOTA: |
879 | return in_group_p(dquot->dq_id); | 879 | return in_group_p(dquot->dq_id); |
880 | } | 880 | } |
@@ -981,7 +981,7 @@ static void send_warning(const struct dquot *dquot, const char warntype) | |||
981 | MINOR(dquot->dq_sb->s_dev)); | 981 | MINOR(dquot->dq_sb->s_dev)); |
982 | if (ret) | 982 | if (ret) |
983 | goto attr_err_out; | 983 | goto attr_err_out; |
984 | ret = nla_put_u64(skb, QUOTA_NL_A_CAUSED_ID, current->user->uid); | 984 | ret = nla_put_u64(skb, QUOTA_NL_A_CAUSED_ID, current_uid()); |
985 | if (ret) | 985 | if (ret) |
986 | goto attr_err_out; | 986 | goto attr_err_out; |
987 | genlmsg_end(skb, msg_head); | 987 | genlmsg_end(skb, msg_head); |