|
From: Gleb C. <lna...@ya...> - 2023-06-20 06:55:28
|
Commit: be1574d GitHub URL: https://github.com/SCST-project/scst/commit/be1574d80e0ff51c74bb05f4a1996e1316df78b5 Author: Gleb Chesnokov Date: 2023-06-20T09:53:50+03:00 Log Message: ----------- scst_lib: Make __scst_ext_blocking_done() static Since __scst_ext_blocking_done() is only called from inside scst_lib.c, declare that function static. This patch doesn't change any functionality. Modified Paths: -------------- scst/src/scst_lib.c | 13 ++++++++----- scst/src/scst_priv.h | 1 - 2 files changed, 8 insertions(+), 6 deletions(-) =================================================================== diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 897d526..23149b6 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -14854,14 +14854,18 @@ static inline void scst_ext_blocker_put(struct scst_ext_blocker *b) } /* Must be called under dev_lock and BHs off. Might release it, then reacquire. */ -void __scst_ext_blocking_done(struct scst_device *dev) +static void __scst_ext_blocking_done(struct scst_device *dev) + __releases(&dev->dev_lock) + __acquires(&dev->dev_lock) { bool stop; TRACE_ENTRY(); + lockdep_assert_held(&dev->dev_lock); + TRACE_BLOCK("Notifying ext blockers for dev %s (ext_blocks_cnt %d)", - dev->virt_name, dev->ext_blocks_cnt); + dev->virt_name, dev->ext_blocks_cnt); stop = list_empty(&dev->ext_blockers_list); while (!stop) { @@ -14870,8 +14874,8 @@ void __scst_ext_blocking_done(struct scst_device *dev) b = list_first_entry(&dev->ext_blockers_list, typeof(*b), ext_blockers_list_entry); - TRACE_DBG("Notifying async ext blocker %p (cnt %d)", b, - dev->ext_blocks_cnt); + TRACE_DBG("Notifying async ext blocker %p (cnt %d)", + b, dev->ext_blocks_cnt); list_del(&b->ext_blockers_list_entry); @@ -14890,7 +14894,6 @@ void __scst_ext_blocking_done(struct scst_device *dev) } TRACE_EXIT(); - return; } static void scst_ext_blocking_done_fn(struct work_struct *work) diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index 641ae5b..c9c0d3f 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -615,7 +615,6 @@ int scst_sync_ext_block_dev(struct scst_device *dev); int scst_ext_block_dev(struct scst_device *dev, ext_blocker_done_fn_t done_fn, const void *priv, size_t priv_len, bool block_stpg); void scst_ext_unblock_dev(struct scst_device *dev, bool stpg); -void __scst_ext_blocking_done(struct scst_device *dev); void scst_ext_blocking_done(struct scst_device *dev); int scst_get_suspend_count(void); |