]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: optimize variables size in btrfs_submit_compressed_write
authorAnand Jain <anand.jain@oracle.com>
Sat, 29 May 2021 09:48:35 +0000 (17:48 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:07 +0000 (15:19 +0200)
Patch "btrfs: reduce compressed_bio member's types" reduced some
member's size. Function arguments @len, @compressed_len and @nr_pages
can be declared as unsigned int.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h

index c527ae858d37e25b4d4c94b2424380a31841d781..36731b5987702b7251830bd73e7a53ad8ca8a57b 100644 (file)
@@ -387,10 +387,10 @@ out:
  * the end io hooks.
  */
 blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start,
-                                unsigned long len, u64 disk_start,
-                                unsigned long compressed_len,
+                                unsigned int len, u64 disk_start,
+                                unsigned int compressed_len,
                                 struct page **compressed_pages,
-                                unsigned long nr_pages,
+                                unsigned int nr_pages,
                                 unsigned int write_flags,
                                 struct cgroup_subsys_state *blkcg_css)
 {
index 00d8439048c9a67c98e17a3580d9f50bb0839785..c359f20920d0a5fe2a4cee21871eefc8776da893 100644 (file)
@@ -91,10 +91,10 @@ int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
                              struct bio *bio);
 
 blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start,
-                                 unsigned long len, u64 disk_start,
-                                 unsigned long compressed_len,
+                                 unsigned int len, u64 disk_start,
+                                 unsigned int compressed_len,
                                  struct page **compressed_pages,
-                                 unsigned long nr_pages,
+                                 unsigned int nr_pages,
                                  unsigned int write_flags,
                                  struct cgroup_subsys_state *blkcg_css);
 blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,