target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bodo Stroesser <bostroesser@gmail.com>
To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Bodo Stroesser <bostroesser@gmail.com>,
	Mike Christie <michael.christie@oracle.com>
Subject: [PATCH v2 4/6] scsi: target: tcmu: Remove function tcmu_get_block_page
Date: Wed, 24 Mar 2021 20:57:56 +0100	[thread overview]
Message-ID: <20210324195758.2021-5-bostroesser@gmail.com> (raw)
In-Reply-To: <20210324195758.2021-1-bostroesser@gmail.com>

After previous patch there is only one caller of
tcmu_get_block_page left. Since it is a one-liner,
we better remove the function.

Signed-off-by: Bodo Stroesser <bostroesser@gmail.com>
---
 drivers/target/target_core_user.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 3596346f362e..9b2bff450510 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -561,12 +561,6 @@ static int tcmu_get_empty_blocks(struct tcmu_dev *udev,
 	return iov_cnt;
 }
 
-static inline struct page *
-tcmu_get_block_page(struct tcmu_dev *udev, uint32_t dpi)
-{
-	return xa_load(&udev->data_pages, dpi);
-}
-
 static inline void tcmu_free_cmd(struct tcmu_cmd *tcmu_cmd)
 {
 	kfree(tcmu_cmd->dbi);
@@ -1786,7 +1780,7 @@ static struct page *tcmu_try_get_data_page(struct tcmu_dev *udev, uint32_t dpi)
 	struct page *page;
 
 	mutex_lock(&udev->cmdr_lock);
-	page = tcmu_get_block_page(udev, dpi);
+	page = xa_load(&udev->data_pages, dpi);
 	if (likely(page)) {
 		mutex_unlock(&udev->cmdr_lock);
 		return page;
-- 
2.12.3


  parent reply	other threads:[~2021-03-24 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 19:57 [PATCH v2 0/6] scsi: target: tcmu: Allow data block size greater than PAGE_SIZE Bodo Stroesser
2021-03-24 19:57 ` [PATCH v2 1/6] scsi: target: tcmu: Adjust names of variables and definitions Bodo Stroesser
2021-03-24 19:57 ` [PATCH v2 2/6] scsi: target: tcmu: Prepare for PAGE_SIZE != DATA_BLOCK_SIZE Bodo Stroesser
2021-03-24 19:57 ` [PATCH v2 3/6] scsi: target: tcmu: Support DATA_BLOCK_SIZE = N * PAGE_SIZE Bodo Stroesser
2021-03-24 19:57 ` Bodo Stroesser [this message]
2021-03-24 19:57 ` [PATCH v2 5/6] scsi: target: tcmu: Replace block size definitions with new udev members Bodo Stroesser
2021-03-24 19:57 ` [PATCH v2 6/6] scsi: target: tcmu: Make data_pages_per_blk changeable via configFS Bodo Stroesser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210324195758.2021-5-bostroesser@gmail.com \
    --to=bostroesser@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).