Re: + mm-z3foldc-lock-z3fold-page-before-__setpagemovable.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Jul 2019 17:20:56 -0700 Shakeel Butt <shakeelb@xxxxxxxxxx> wrote:

> > --- a/mm/z3fold.c~mm-z3foldc-lock-z3fold-page-before-__setpagemovable
> > +++ a/mm/z3fold.c
> > @@ -924,7 +924,16 @@ retry:
> >                 set_bit(PAGE_HEADLESS, &page->private);
> >                 goto headless;
> >         }
> > -       __SetPageMovable(page, pool->inode->i_mapping);
> > +       if (can_sleep) {
> > +               lock_page(page);
> > +               __SetPageMovable(page, pool->inode->i_mapping);
> > +               unlock_page(page);
> > +       } else {
> > +               if (!trylock_page(page)) {
> 
> Oops, the above should be just trylock_page() without the '!'.

Sigh.

--- a/include/linux/pagemap.h~a
+++ a/include/linux/pagemap.h
@@ -451,6 +451,9 @@ extern int __lock_page_or_retry(struct p
 				unsigned int flags);
 extern void unlock_page(struct page *page);
 
+/*
+ * Return true if the page was successfully locked
+ */
 static inline int trylock_page(struct page *page)
 {
 	page = compound_head(page);

> Andrew,
> can you please fix this in-place or do you want a new version to be
> posted.

Thanks, I'll fix.



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux