Skip to content

Commit 8f659ad

Browse files
dhowellsxjamesmorris
authored andcommitted
CRED: Wrap task credential accesses in the JFS filesystem
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> Acked-by: Dave Kleikamp <shaggy@austin.ibm.com> Cc: jfs-discussion@lists.sourceforge.net Signed-off-by: James Morris <jmorris@namei.org>
1 parent 77c70de commit 8f659ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/jfs/jfs_inode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
9393
return ERR_PTR(rc);
9494
}
9595

96-
inode->i_uid = current->fsuid;
96+
inode->i_uid = current_fsuid();
9797
if (parent->i_mode & S_ISGID) {
9898
inode->i_gid = parent->i_gid;
9999
if (S_ISDIR(mode))
100100
mode |= S_ISGID;
101101
} else
102-
inode->i_gid = current->fsgid;
102+
inode->i_gid = current_fsgid();
103103

104104
/*
105105
* New inodes need to save sane values on disk when

0 commit comments

Comments
 (0)