Re: [PATCH v1] rbd: convert to use secs_to_jiffies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/25 6:07 AM, Yuesong Li wrote:
Since secs_to_jiffies()(commit:b35108a51cf7) has been introduced, we can
use it to avoid scaling the time to msec.

Signed-off-by: Yuesong Li <liyuesong@xxxxxxxx>

Looks good.

Reviewed-by: Alex Elder <elder@xxxxxxxxxxxx>

---
  drivers/block/rbd.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index faafd7ff43d6..92d04a60718f 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4162,7 +4162,7 @@ static void rbd_acquire_lock(struct work_struct *work)
  		dout("%s rbd_dev %p requeuing lock_dwork\n", __func__,
  		     rbd_dev);
  		mod_delayed_work(rbd_dev->task_wq, &rbd_dev->lock_dwork,
-		    msecs_to_jiffies(2 * RBD_NOTIFY_TIMEOUT * MSEC_PER_SEC));
+		    secs_to_jiffies(2 * RBD_NOTIFY_TIMEOUT));
  	}
  }
@@ -6285,7 +6285,7 @@ static int rbd_parse_param(struct fs_parameter *param,
  		/* 0 is "wait forever" (i.e. infinite timeout) */
  		if (result.uint_32 > INT_MAX / 1000)
  			goto out_of_range;
-		opt->lock_timeout = msecs_to_jiffies(result.uint_32 * 1000);
+		opt->lock_timeout = secs_to_jiffies(result.uint_32);
  		break;
  	case Opt_pool_ns:
  		kfree(pctx->spec->pool_ns);





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux