mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	quota: Remove BUG_ON in dquot_load_quota_sb()
The case when someone passes DQUOT_SUSPENDED flag to dquot_load_quota_sb() is easy to handle. So just WARN_ON_ONCE and bail with error if that happens instead of calling BUG_ON which is likely to lockup the machine. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
		
							parent
							
								
									c8238508c8
								
							
						
					
					
						commit
						d44c576637
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -2385,7 +2385,8 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
 | 
				
			||||||
	lockdep_assert_held_write(&sb->s_umount);
 | 
						lockdep_assert_held_write(&sb->s_umount);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Just unsuspend quotas? */
 | 
						/* Just unsuspend quotas? */
 | 
				
			||||||
	BUG_ON(flags & DQUOT_SUSPENDED);
 | 
						if (WARN_ON_ONCE(flags & DQUOT_SUSPENDED))
 | 
				
			||||||
 | 
							return -EINVAL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!fmt)
 | 
						if (!fmt)
 | 
				
			||||||
		return -ESRCH;
 | 
							return -ESRCH;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue