Skip to content

Commit 414cb20

Browse files
dhowellsxjamesmorris
authored andcommitted
CRED: Wrap task credential accesses in the ReiserFS 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> Cc: reiserfs-devel@vger.kernel.org Signed-off-by: James Morris <jmorris@namei.org>
1 parent 0785f4d commit 414cb20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/reiserfs/namei.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode)
573573
/* the quota init calls have to know who to charge the quota to, so
574574
** we have to set uid and gid here
575575
*/
576-
inode->i_uid = current->fsuid;
576+
inode->i_uid = current_fsuid();
577577
inode->i_mode = mode;
578578
/* Make inode invalid - just in case we are going to drop it before
579579
* the initialization happens */
@@ -584,7 +584,7 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode)
584584
if (S_ISDIR(mode))
585585
inode->i_mode |= S_ISGID;
586586
} else {
587-
inode->i_gid = current->fsgid;
587+
inode->i_gid = current_fsgid();
588588
}
589589
DQUOT_INIT(inode);
590590
return 0;

0 commit comments

Comments
 (0)