public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <slaby@liberouter.org>
To: Avishay Traeger <atraeger@cs.sunysb.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] set_page_count
Date: Tue, 03 Jan 2006 21:03:58 +0100	[thread overview]
Message-ID: <43BAD8AE.2070709@liberouter.org> (raw)
In-Reply-To: <1136317294.21485.5.camel@rockstar.fsl.cs.sunysb.edu>

Avishay Traeger napsal(a):
> Hello all,
> 
> I sent this to linux-mm, but haven't gotten a response - hope it's OK to
> send here.  I believe the set_page_count() macro is broken, and should
> have parentheses around the 'v' in the second argument (otherwise more
> complex arguments will break).  Here is a patch to 2.6.15 - I haven't
> really tested it, but it looks simple enough.  Any objections?  Anything
> else I need to do?
You should cc somebody (maybe Andrew Morton) and add signed-off-by line if you
want it to be merged. For both, see SubmittingPatches in Documentation.
Also read the whole document, not only those 2 parts...
> 
> Thanks,
> Avishay Traeger
> http://www.fsl.cs.sunysb.edu/~avishay/
> 
> 
> diff -Naur linux-2.6.15/include/linux/mm.h
> linux-2.6.15-mod/include/linux/mm.h
> --- linux-2.6.15/include/linux/mm.h     2006-01-02 22:21:10.000000000
> -0500
> +++ linux-2.6.15-mod/include/linux/mm.h 2006-01-03 11:28:19.000000000
> -0500
> @@ -308,7 +308,7 @@
>   */
>  #define get_page_testone(p)    atomic_inc_and_test(&(p)->_count)
> 
> -#define set_page_count(p,v)    atomic_set(&(p)->_count, v - 1)
> +#define set_page_count(p,v)    atomic_set(&(p)->_count, (v) - 1)
>  #define __put_page(p)          atomic_dec(&(p)->_count)
> 
>  extern void FASTCALL(__page_cache_release(struct page *));
> 

regards,
-- 
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      jirislaby@gmail.com      ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E

      reply	other threads:[~2006-01-03 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 19:41 [PATCH] set_page_count Avishay Traeger
2006-01-03 20:03 ` Jiri Slaby [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43BAD8AE.2070709@liberouter.org \
    --to=slaby@liberouter.org \
    --cc=atraeger@cs.sunysb.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox