patch-2.4.17 linux/fs/block_dev.c
Next file: linux/fs/buffer.c
Previous file: linux/fs/binfmt_elf.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Fri Dec 21 16:40:32 2001
- Orig file:
linux-2.4.16/fs/block_dev.c
- Orig date:
Wed Nov 21 22:07:25 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/fs/block_dev.c linux/fs/block_dev.c
@@ -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;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)