| Kernel v2.4.17-rc2 /fs/block_dev.c |
|---|
 2.4.17-rc2
 fs
 block_dev.c
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/fs/block_dev.c linux/fs/block_dev.c
--- linux-2.4.16/fs/block_dev.c Wed Nov 21 22:07:25 2001
+++ linux/fs/block_dev.c Tue Dec 18 20:13:28 2001
@@ -234,7 +234,7 @@
#define HASH_SIZE (1UL << HASH_BITS)
#define HASH_MASK (HASH_SIZE-1)
static struct list_head bdev_hashtable[HASH_SIZE];
-static spinlock_t bdev_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t bdev_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
static kmem_cache_t * bdev_cachep;
#define alloc_bdev() \
@@ -329,6 +329,7 @@
inode->i_bdev = new_bdev;
inode->i_data.a_ops = &def_blk_aops;
inode->i_data.gfp_mask = GFP_USER;
+ inode->i_mode = S_IFBLK;
spin_lock(&bdev_lock);
bdev = bdfind(dev, head);
if (!bdev) {
@@ -498,7 +499,10 @@
de = devfs_find_handle (NULL, NULL, i, MINOR (dev),
DEVFS_SPECIAL_BLK, 0);
- if (de) bdops = devfs_get_ops (de);
+ if (de) {
+ bdops = devfs_get_ops (de);
+ devfs_put_ops (de); /* We're running in owner module */
+ }
}
if (bdops == NULL)
return 0;
|