Skip to contentSkip to conversation

lessen the impact of a deprecated warning in hugetlbfs

PATCH Dave Jones 3 participants 3 messages Nov 3, 2010 – Nov 13, 2010 HugeTLB

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

WARN_ONCE is a bit strong for a deprecation warning, given that it spews a huge backtrace.

fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~ +1 -2
@@ -915,8 +915,7 @@ struct file *hugetlb_file_setup(const ch
 	if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
 		*user = current_user();
 		if (user_shm_lock(size, *user)) {
-			WARN_ONCE(1,
-			  "Using mlock ulimits for SHM_HUGETLB deprecated\n");
+			printk_once("Using mlock ulimits for SHM_HUGETLB deprecated\n");
 		} else {
 			*user = NULL;
 			return ERR_PTR(-EPERM);
#1 lore raw
Quoted 8 lines · Dave Jones

WARN_ONCE is a bit strong for a deprecation warning, given that it spews a huge backtrace.

fs/hugetlbfs/inode.c struct file *hugetlb_file_setup(const ch · line 918

Quoted 6 lines
fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~ +1 -2
@@ -915,8 +915,7 @@ struct file *hugetlb_file_setup(const ch
 	if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
 		*user = current_user();
 		if (user_shm_lock(size, *user)) {
-			WARN_ONCE(1,
-			  "Using mlock ulimits for SHM_HUGETLB deprecated\n");
+			printk_once("Using mlock ulimits for SHM_HUGETLB deprecated\n");

Please add a KERN_NOTICE or similar.
The grammar could be improved via "is deprecated"

#2 lore raw
In reply to Dave Jones

It was to be deprecated by 2.6.31. It is better to kill it I think.

Thanks,
Kiran

Quoted 17 lines · Dave Jones

WARN_ONCE is a bit strong for a deprecation warning, given that it spews a huge backtrace.

fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~ +1 -2
@@ -915,8 +915,7 @@ struct file *hugetlb_file_setup(const ch
 	if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
 		*user = current_user();
 		if (user_shm_lock(size, *user)) {
-			WARN_ONCE(1,
-			  "Using mlock ulimits for SHM_HUGETLB deprecated\n");
+			printk_once("Using mlock ulimits for SHM_HUGETLB deprecated\n");
 		} else {
 			*user = NULL;
 			return ERR_PTR(-EPERM);