2012-10-18 14:51:30

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] fuse: remove unused variable in fuse_try_move_page()

From: Wei Yongjun <[email protected]>

The variables mapping,index are initialized but never used
otherwise, so remove the unused variables.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
---
fs/fuse/dev.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 8c23fa7..53c294c 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -692,8 +692,6 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
struct page *oldpage = *pagep;
struct page *newpage;
struct pipe_buffer *buf = cs->pipebufs;
- struct address_space *mapping;
- pgoff_t index;

unlock_request(cs->fc, cs->req);
fuse_copy_finish(cs);
@@ -724,9 +722,6 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
if (fuse_check_page(newpage) != 0)
goto out_fallback_unlock;

- mapping = oldpage->mapping;
- index = oldpage->index;
-
/*
* This is a new and locked page, it shouldn't be mapped or
* have any special flags on it


2012-11-10 15:57:18

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [PATCH] fuse: remove unused variable in fuse_try_move_page()

Wei Yongjun <[email protected]> writes:

> From: Wei Yongjun <[email protected]>
>
> The variables mapping,index are initialized but never used
> otherwise, so remove the unused variables.
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)

Thanks, applied.

Miklos

>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> fs/fuse/dev.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index 8c23fa7..53c294c 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -692,8 +692,6 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
> struct page *oldpage = *pagep;
> struct page *newpage;
> struct pipe_buffer *buf = cs->pipebufs;
> - struct address_space *mapping;
> - pgoff_t index;
>
> unlock_request(cs->fc, cs->req);
> fuse_copy_finish(cs);
> @@ -724,9 +722,6 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
> if (fuse_check_page(newpage) != 0)
> goto out_fallback_unlock;
>
> - mapping = oldpage->mapping;
> - index = oldpage->index;
> -
> /*
> * This is a new and locked page, it shouldn't be mapped or
> * have any special flags on it