Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[firefly-linux-kernel-4.4.55.git] / include / linux / buffer_head.h
index 620f1d1088cb06d46fea6ed6fe4daafeb06435f3..43e649a72529afa8282f7da2029ab8e6759f0a97 100644 (file)
@@ -304,15 +304,10 @@ map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
        bh->b_size = sb->s_blocksize;
 }
 
-/*
- * Calling wait_on_buffer() for a zero-ref buffer is illegal, so we call into
- * __wait_on_buffer() just to trip a debug check.  Because debug code in inline
- * functions is bloaty.
- */
 static inline void wait_on_buffer(struct buffer_head *bh)
 {
        might_sleep();
-       if (buffer_locked(bh) || atomic_read(&bh->b_count) == 0)
+       if (buffer_locked(bh))
                __wait_on_buffer(bh);
 }