diff options
-rw-r--r-- | drivers/block/floppy.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3fdceda85735..82c30f9f81ca 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -2542,10 +2542,8 @@ static int make_raw_rw_request(void) | |||
2542 | int tracksize; | 2542 | int tracksize; |
2543 | int ssize; | 2543 | int ssize; |
2544 | 2544 | ||
2545 | if (max_buffer_sectors == 0) { | 2545 | if (WARN(max_buffer_sectors == 0, "VFS: Block I/O scheduled on unopened device\n")) |
2546 | pr_info("VFS: Block I/O scheduled on unopened device\n"); | ||
2547 | return 0; | 2546 | return 0; |
2548 | } | ||
2549 | 2547 | ||
2550 | set_fdc((long)current_req->rq_disk->private_data); | 2548 | set_fdc((long)current_req->rq_disk->private_data); |
2551 | 2549 | ||
@@ -2895,19 +2893,16 @@ static void process_fd_request(void) | |||
2895 | 2893 | ||
2896 | static void do_fd_request(struct request_queue *q) | 2894 | static void do_fd_request(struct request_queue *q) |
2897 | { | 2895 | { |
2898 | if (max_buffer_sectors == 0) { | 2896 | if (WARN(max_buffer_sectors == 0, |
2899 | pr_info("VFS: %s called on non-open device\n", __func__); | 2897 | "VFS: %s called on non-open device\n", __func__)) |
2900 | return; | 2898 | return; |
2901 | } | ||
2902 | 2899 | ||
2903 | if (atomic_read(&usage_count) == 0) { | 2900 | if (WARN(atomic_read(&usage_count) == 0, |
2904 | pr_info("warning: usage count=0, current_req=%p exiting\n", | 2901 | "warning: usage count=0, current_req=%p sect=%ld type=%x flags=%x\n", |
2905 | current_req); | 2902 | current_req, (long)blk_rq_pos(current_req), current_req->cmd_type, |
2906 | pr_info("sect=%ld type=%x flags=%x\n", | 2903 | current_req->cmd_flags)) |
2907 | (long)blk_rq_pos(current_req), current_req->cmd_type, | ||
2908 | current_req->cmd_flags); | ||
2909 | return; | 2904 | return; |
2910 | } | 2905 | |
2911 | if (test_bit(0, &fdc_busy)) { | 2906 | if (test_bit(0, &fdc_busy)) { |
2912 | /* fdc busy, this new request will be treated when the | 2907 | /* fdc busy, this new request will be treated when the |
2913 | current one is done */ | 2908 | current one is done */ |
@@ -3817,10 +3812,10 @@ static int floppy_revalidate(struct gendisk *disk) | |||
3817 | if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || | 3812 | if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || |
3818 | test_bit(FD_VERIFY_BIT, &UDRS->flags) || | 3813 | test_bit(FD_VERIFY_BIT, &UDRS->flags) || |
3819 | test_bit(drive, &fake_change) || NO_GEOM) { | 3814 | test_bit(drive, &fake_change) || NO_GEOM) { |
3820 | if (atomic_read(&usage_count) == 0) { | 3815 | if (WARN(atomic_read(&usage_count) == 0, |
3821 | pr_info("VFS: revalidate called on non-open device.\n"); | 3816 | "VFS: revalidate called on non-open device.\n")) |
3822 | return -EFAULT; | 3817 | return -EFAULT; |
3823 | } | 3818 | |
3824 | lock_fdc(drive, false); | 3819 | lock_fdc(drive, false); |
3825 | cf = (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || | 3820 | cf = (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || |
3826 | test_bit(FD_VERIFY_BIT, &UDRS->flags)); | 3821 | test_bit(FD_VERIFY_BIT, &UDRS->flags)); |