mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
CRED: Wrap current->cred and a few other accessors
Wrap current->cred and a few other accessors to hide their actual implementation. Signed-off-by: David Howells <[email protected]> Acked-by: James Morris <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
f1752eec61
commit
86a264abe5
27 changed files with 271 additions and 162 deletions
|
|
@ -366,7 +366,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
|
|||
if (shmflg & SHM_HUGETLB) {
|
||||
/* hugetlb_file_setup takes care of mlock user accounting */
|
||||
file = hugetlb_file_setup(name, size);
|
||||
shp->mlock_user = current->cred->user;
|
||||
shp->mlock_user = current_user();
|
||||
} else {
|
||||
int acctflag = VM_ACCOUNT;
|
||||
/*
|
||||
|
|
@ -767,7 +767,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf)
|
|||
goto out_unlock;
|
||||
|
||||
if(cmd==SHM_LOCK) {
|
||||
struct user_struct *user = current->cred->user;
|
||||
struct user_struct *user = current_user();
|
||||
if (!is_file_hugepages(shp->shm_file)) {
|
||||
err = shmem_lock(shp->shm_file, 1, user);
|
||||
if (!err && !(shp->shm_perm.mode & SHM_LOCKED)){
|
||||
|
|
|
|||
Loading…
Reference in a new issue