linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: Anand Jain <anand.jain@oracle.com>
Subject: [PATCH 1/4] btrfs: reduce the variable size to fit nr_pages
Date: Sat, 29 May 2021 17:48:33 +0800	[thread overview]
Message-ID: <ad14b486d19f6a45d15106eac3bbbc7fd84de015.1622252932.git.anand.jain@oracle.com> (raw)
In-Reply-To: <cover.1622252932.git.anand.jain@oracle.com>

Patch (btrfs: reduce compressed_bio member's types) reduced the 
@nr_pages size to unsigned int, its cascading effects are fixed here.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/compression.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 7bd7cae51dbf..e10041af8476 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -149,7 +149,7 @@ static int check_compressed_csum(struct btrfs_inode *inode, struct bio *bio,
 	const u32 csum_size = fs_info->csum_size;
 	const u32 sectorsize = fs_info->sectorsize;
 	struct page *page;
-	unsigned long i;
+	unsigned int i;
 	char *kaddr;
 	u8 csum[BTRFS_CSUM_SIZE];
 	struct compressed_bio *cb = bio->bi_private;
@@ -208,7 +208,7 @@ static void end_compressed_bio_read(struct bio *bio)
 	struct compressed_bio *cb = bio->bi_private;
 	struct inode *inode;
 	struct page *page;
-	unsigned long index;
+	unsigned int index;
 	unsigned int mirror = btrfs_io_bio(bio)->mirror_num;
 	int ret = 0;
 
@@ -334,7 +334,7 @@ static void end_compressed_bio_write(struct bio *bio)
 	struct compressed_bio *cb = bio->bi_private;
 	struct inode *inode;
 	struct page *page;
-	unsigned long index;
+	unsigned int index;
 
 	if (bio->bi_status)
 		cb->errors = 1;
-- 
2.30.2


  reply	other threads:[~2021-05-29  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29  9:48 [PATCH 0/4] variables fixes in compression.c Anand Jain
2021-05-29  9:48 ` Anand Jain [this message]
2021-05-29  9:48 ` [PATCH 2/4] btrfs: optimize variables size in btrfs_submit_compressed_read Anand Jain
2021-05-29  9:48 ` [PATCH 3/4] btrfs: optimize variables size in btrfs_submit_compressed_write Anand Jain
2021-05-29  9:48 ` [PATCH 4/4] btrfs: fix comment about max_out in btrfs_compress_pages Anand Jain
2021-05-31 18:37 ` [PATCH 0/4] variables fixes in compression.c David Sterba

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=ad14b486d19f6a45d15106eac3bbbc7fd84de015.1622252932.git.anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@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).