diff mbox

[13/15] ceph: Use pagevec_lookup_range_nr_tag()

Message ID 20170914131819.26266-14-jack@suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kara Sept. 14, 2017, 1:18 p.m. UTC
Use new function for looking up pages since nr_pages argument from
pagevec_lookup_range_tag() is going away.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ceph/addr.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Yan, Zheng Sept. 18, 2017, 5:35 a.m. UTC | #1
On Thu, Sep 14, 2017 at 9:18 PM, Jan Kara <jack@suse.cz> wrote:
> Use new function for looking up pages since nr_pages argument from
> pagevec_lookup_range_tag() is going away.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  fs/ceph/addr.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index e57e9d37bf2d..87789c477381 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -869,11 +869,9 @@ static int ceph_writepages_start(struct address_space *mapping,
>                 max_pages = wsize >> PAGE_SHIFT;
>
>  get_more_pages:
> -               pvec_pages = min_t(unsigned, PAGEVEC_SIZE,
> -                                  max_pages - locked_pages);
> -               pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
> +               pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index,
>                                                 end, PAGECACHE_TAG_DIRTY,
> -                                               pvec_pages);
> +                                               max_pages - locked_pages);
>                 dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
>                 if (!pvec_pages && !locked_pages)
>                         break;
> --
> 2.12.3
>

Reviewed-by: "Yan, Zheng" <zyan@redhat.com>

> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Kara Sept. 18, 2017, 7:53 a.m. UTC | #2
On Mon 18-09-17 13:35:50, Yan, Zheng wrote:
> On Thu, Sep 14, 2017 at 9:18 PM, Jan Kara <jack@suse.cz> wrote:
> > Use new function for looking up pages since nr_pages argument from
> > pagevec_lookup_range_tag() is going away.
> >
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> >  fs/ceph/addr.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> > index e57e9d37bf2d..87789c477381 100644
> > --- a/fs/ceph/addr.c
> > +++ b/fs/ceph/addr.c
> > @@ -869,11 +869,9 @@ static int ceph_writepages_start(struct address_space *mapping,
> >                 max_pages = wsize >> PAGE_SHIFT;
> >
> >  get_more_pages:
> > -               pvec_pages = min_t(unsigned, PAGEVEC_SIZE,
> > -                                  max_pages - locked_pages);
> > -               pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
> > +               pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index,
> >                                                 end, PAGECACHE_TAG_DIRTY,
> > -                                               pvec_pages);
> > +                                               max_pages - locked_pages);
> >                 dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
> >                 if (!pvec_pages && !locked_pages)
> >                         break;
> > --
> > 2.12.3
> >
> 
> Reviewed-by: "Yan, Zheng" <zyan@redhat.com>

Thanks for the review!

								Honza
diff mbox

Patch

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index e57e9d37bf2d..87789c477381 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -869,11 +869,9 @@  static int ceph_writepages_start(struct address_space *mapping,
 		max_pages = wsize >> PAGE_SHIFT;
 
 get_more_pages:
-		pvec_pages = min_t(unsigned, PAGEVEC_SIZE,
-				   max_pages - locked_pages);
-		pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
+		pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index,
 						end, PAGECACHE_TAG_DIRTY,
-						pvec_pages);
+						max_pages - locked_pages);
 		dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
 		if (!pvec_pages && !locked_pages)
 			break;