heartbeat.c (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) heartbeat.c (0718afd47f70cf46877c39c25d06b786e1a3f36c)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2004, 2005 Oracle. All rights reserved.
4 */
5
6#include <linux/kernel.h>
7#include <linux/sched.h>
8#include <linux/jiffies.h>

--- 1772 unchanged lines hidden (view full) ---

1781 if (reg->hr_blocks == 0 || reg->hr_start_block == 0 ||
1782 reg->hr_block_bytes == 0)
1783 goto out2;
1784
1785 if (!S_ISBLK(f.file->f_mapping->host->i_mode))
1786 goto out2;
1787
1788 reg->hr_bdev = blkdev_get_by_dev(f.file->f_mapping->host->i_rdev,
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2004, 2005 Oracle. All rights reserved.
4 */
5
6#include <linux/kernel.h>
7#include <linux/sched.h>
8#include <linux/jiffies.h>

--- 1772 unchanged lines hidden (view full) ---

1781 if (reg->hr_blocks == 0 || reg->hr_start_block == 0 ||
1782 reg->hr_block_bytes == 0)
1783 goto out2;
1784
1785 if (!S_ISBLK(f.file->f_mapping->host->i_mode))
1786 goto out2;
1787
1788 reg->hr_bdev = blkdev_get_by_dev(f.file->f_mapping->host->i_rdev,
1789 FMODE_WRITE | FMODE_READ, NULL);
1789 FMODE_WRITE | FMODE_READ, NULL, NULL);
1790 if (IS_ERR(reg->hr_bdev)) {
1791 ret = PTR_ERR(reg->hr_bdev);
1792 reg->hr_bdev = NULL;
1793 goto out2;
1794 }
1795
1796 sectsize = bdev_logical_block_size(reg->hr_bdev);
1797 if (sectsize != reg->hr_block_bytes) {

--- 744 unchanged lines hidden ---
1790 if (IS_ERR(reg->hr_bdev)) {
1791 ret = PTR_ERR(reg->hr_bdev);
1792 reg->hr_bdev = NULL;
1793 goto out2;
1794 }
1795
1796 sectsize = bdev_logical_block_size(reg->hr_bdev);
1797 if (sectsize != reg->hr_block_bytes) {

--- 744 unchanged lines hidden ---