aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/hugetlbfs/inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 7913e3252167..79408159a001 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -953,7 +953,11 @@ struct file *hugetlb_file_setup(const char *name, size_t size,
953 if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) { 953 if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
954 *user = current_user(); 954 *user = current_user();
955 if (user_shm_lock(size, *user)) { 955 if (user_shm_lock(size, *user)) {
956 printk_once(KERN_WARNING "Using mlock ulimits for SHM_HUGETLB is deprecated\n"); 956 task_lock(current);
957 printk_once(KERN_WARNING
958 "%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
959 current->comm, current->pid);
960 task_unlock(current);
957 } else { 961 } else {
958 *user = NULL; 962 *user = NULL;
959 return ERR_PTR(-EPERM); 963 return ERR_PTR(-EPERM);