aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-08-11 03:36:51 -0400
committerJiri Kosina <jkosina@suse.cz>2010-08-11 03:36:51 -0400
commit6396fc3b3ff3f6b942992b653a62df11dcef9bea (patch)
treedb3c7cbe833b43c653adc99f70941431c5ff7c4e /drivers/s390/char
parent4785879e4d340e24e54f6de2ccfc42728b912808 (diff)
parent3d30701b58970425e1d45994d6cb82f828924fdd (diff)
Merge branch 'master' into for-next
Conflicts: fs/exofs/inode.c
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/tape_block.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index 097da8ce6be6..b7de02525ec9 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -16,6 +16,7 @@
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/blkdev.h> 18#include <linux/blkdev.h>
19#include <linux/smp_lock.h>
19#include <linux/interrupt.h> 20#include <linux/interrupt.h>
20#include <linux/buffer_head.h> 21#include <linux/buffer_head.h>
21#include <linux/kernel.h> 22#include <linux/kernel.h>
@@ -361,6 +362,7 @@ tapeblock_open(struct block_device *bdev, fmode_t mode)
361 struct tape_device * device; 362 struct tape_device * device;
362 int rc; 363 int rc;
363 364
365 lock_kernel();
364 device = tape_get_device(disk->private_data); 366 device = tape_get_device(disk->private_data);
365 367
366 if (device->required_tapemarks) { 368 if (device->required_tapemarks) {
@@ -384,12 +386,14 @@ tapeblock_open(struct block_device *bdev, fmode_t mode)
384 * is called. 386 * is called.
385 */ 387 */
386 tape_state_set(device, TS_BLKUSE); 388 tape_state_set(device, TS_BLKUSE);
389 unlock_kernel();
387 return 0; 390 return 0;
388 391
389release: 392release:
390 tape_release(device); 393 tape_release(device);
391 put_device: 394 put_device:
392 tape_put_device(device); 395 tape_put_device(device);
396 unlock_kernel();
393 return rc; 397 return rc;
394} 398}
395 399
@@ -403,10 +407,12 @@ static int
403tapeblock_release(struct gendisk *disk, fmode_t mode) 407tapeblock_release(struct gendisk *disk, fmode_t mode)
404{ 408{
405 struct tape_device *device = disk->private_data; 409 struct tape_device *device = disk->private_data;
406 410
411 lock_kernel();
407 tape_state_set(device, TS_IN_USE); 412 tape_state_set(device, TS_IN_USE);
408 tape_release(device); 413 tape_release(device);
409 tape_put_device(device); 414 tape_put_device(device);
415 unlock_kernel();
410 416
411 return 0; 417 return 0;
412} 418}