Linux-BTRFS Archive on lore.kernel.org
 help / Atom feed
* [PATCH] [PATCH] btrfs: remove unused wariable 'num_pages'
@ 2019-01-22 22:59 Matthew Friday
  2019-01-23 13:06 ` Nikolay Borisov
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Friday @ 2019-01-22 22:59 UTC (permalink / raw)
  To: dsterba; +Cc: lkmfriday, Chris Mason, Josef Bacik, linux-btrfs, linux-kernel

Signed-off-by: Matthew Friday <lkmfriday@gmail.com>
---
 fs/btrfs/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9c8e1734429c..6243f734c0cd 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3278,7 +3278,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
 			     struct inode *dst, u64 dst_loff)
 {
 	int ret;
-	int num_pages = PAGE_ALIGN(BTRFS_MAX_DEDUPE_LEN) >> PAGE_SHIFT;
 	u64 i, tail_len, chunk_count;
 
 	/* don't make the dst file partly checksummed */
@@ -3291,8 +3290,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
 
 	tail_len = olen % BTRFS_MAX_DEDUPE_LEN;
 	chunk_count = div_u64(olen, BTRFS_MAX_DEDUPE_LEN);
-	if (chunk_count == 0)
-		num_pages = PAGE_ALIGN(tail_len) >> PAGE_SHIFT;
 
 	for (i = 0; i < chunk_count; i++) {
 		ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,
-- 
2.11.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [PATCH] btrfs: remove unused wariable 'num_pages'
  2019-01-22 22:59 [PATCH] [PATCH] btrfs: remove unused wariable 'num_pages' Matthew Friday
@ 2019-01-23 13:06 ` Nikolay Borisov
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Borisov @ 2019-01-23 13:06 UTC (permalink / raw)
  To: Matthew Friday, dsterba
  Cc: Chris Mason, Josef Bacik, linux-btrfs, linux-kernel



On 23.01.19 г. 0:59 ч., Matthew Friday wrote:
> Signed-off-by: Matthew Friday <lkmfriday@gmail.com>

It seems you are using an outdated version of the code. When sending new
code always base it on misc-next branch from
https://github.com/kdave/btrfs-devel

> ---
>  fs/btrfs/ioctl.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 9c8e1734429c..6243f734c0cd 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -3278,7 +3278,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
>  			     struct inode *dst, u64 dst_loff)
>  {
>  	int ret;
> -	int num_pages = PAGE_ALIGN(BTRFS_MAX_DEDUPE_LEN) >> PAGE_SHIFT;
>  	u64 i, tail_len, chunk_count;
>  
>  	/* don't make the dst file partly checksummed */
> @@ -3291,8 +3290,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
>  
>  	tail_len = olen % BTRFS_MAX_DEDUPE_LEN;
>  	chunk_count = div_u64(olen, BTRFS_MAX_DEDUPE_LEN);
> -	if (chunk_count == 0)
> -		num_pages = PAGE_ALIGN(tail_len) >> PAGE_SHIFT;
>  
>  	for (i = 0; i < chunk_count; i++) {
>  		ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 22:59 [PATCH] [PATCH] btrfs: remove unused wariable 'num_pages' Matthew Friday
2019-01-23 13:06 ` Nikolay Borisov

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox