mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	fsnotify: convert runtime BUG_ON() to BUILD_BUG_ON()
The BUG_ON() statements to verify number of bits in ALL_FSNOTIFY_BITS and ALL_INOTIFY_BITS are converted to build time check of the constant. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
		
							parent
							
								
									23c9deeb32
								
							
						
					
					
						commit
						a39f7ec417
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -395,7 +395,7 @@ static __init int fsnotify_init(void) | |||
| { | ||||
| 	int ret; | ||||
| 
 | ||||
| 	BUG_ON(hweight32(ALL_FSNOTIFY_BITS) != 23); | ||||
| 	BUILD_BUG_ON(HWEIGHT32(ALL_FSNOTIFY_BITS) != 23); | ||||
| 
 | ||||
| 	ret = init_srcu_struct(&fsnotify_mark_srcu); | ||||
| 	if (ret) | ||||
|  |  | |||
|  | @ -815,7 +815,7 @@ static int __init inotify_user_setup(void) | |||
| 	BUILD_BUG_ON(IN_ISDIR != FS_ISDIR); | ||||
| 	BUILD_BUG_ON(IN_ONESHOT != FS_IN_ONESHOT); | ||||
| 
 | ||||
| 	BUG_ON(hweight32(ALL_INOTIFY_BITS) != 22); | ||||
| 	BUILD_BUG_ON(HWEIGHT32(ALL_INOTIFY_BITS) != 22); | ||||
| 
 | ||||
| 	inotify_inode_mark_cachep = KMEM_CACHE(inotify_inode_mark, | ||||
| 					       SLAB_PANIC|SLAB_ACCOUNT); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Amir Goldstein
						Amir Goldstein