Skip to contentSkip to conversation

silence invalidate_bdev() a bit

TRIVIAL Rusty Trivial Russell 1 participant 1 message Aug 20, 2002 VFS

lore
Share & tools
lore
#0 lore raw

[ Experts, does this make sense? The Debian kernel tree makes it a
KERN_DEBUG printk instead. ]

From: Christoph Hellwig <[email protected]>

The 2.4.1x invalidate_bdev() is a little to verbose and warns about conditions that can easily happen in practice. Silence up those printks a little like most vendor trees already do.

fs/buffer.c renamed from fs/buffer.c.orig +2 -2
@@ -695,13 +695,13 @@
 			/* All buffers in the lru lists are mapped */
 			if (!buffer_mapped(bh))
 				BUG();
-			if (buffer_dirty(bh))
+			if (buffer_dirty(bh) && destroy_dirty_buffers)
 				printk("invalidate: dirty buffer\n");
 			if (!atomic_read(&bh->b_count)) {
 				if (destroy_dirty_buffers || !buffer_dirty(bh)) {
 					remove_inode_queue(bh);
 				}
-			} else
+			} else if (!bdev->bd_openers)
 				printk("invalidate: busy buffer\n");
 
 			write_unlock(&hash_table_lock);
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: Christoph Hellwig <[email protected]>: [PATCH] silence invalidate_bdev() a bit