Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139148
b: refs/heads/master
c: 8a0bdec
h: refs/heads/master
v: v3
  • Loading branch information
Ravikiran G Thirumalai authored and Linus Torvalds committed Apr 1, 2009
1 parent 1659dbd commit 8780644
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3a7cca1ef4c1af9b0acef9bd66eff6582a737b5
refs/heads/master: 8a0bdec194c21c8fdef840989d0d7b742bb5d4bc
8 changes: 1 addition & 7 deletions trunk/fs/hugetlbfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,7 @@ static struct vfsmount *hugetlbfs_vfsmount;

static int can_do_hugetlb_shm(void)
{
return likely(capable(CAP_IPC_LOCK) ||
in_group_p(sysctl_hugetlb_shm_group) ||
can_do_mlock());
return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group);
}

struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag)
Expand All @@ -963,9 +961,6 @@ struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag)
if (!can_do_hugetlb_shm())
return ERR_PTR(-EPERM);

if (!user_shm_lock(size, user))
return ERR_PTR(-ENOMEM);

root = hugetlbfs_vfsmount->mnt_root;
quick_string.name = name;
quick_string.len = strlen(quick_string.name);
Expand Down Expand Up @@ -1004,7 +999,6 @@ struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag)
out_dentry:
dput(dentry);
out_shm_unlock:
user_shm_unlock(size, user);
return ERR_PTR(error);
}

Expand Down

0 comments on commit 8780644

Please sign in to comment.