lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140320145829.fa212e2f15c3199383f3fd11@linux-foundation.org>
Date:	Thu, 20 Mar 2014 14:58:29 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] mm/filemap.c: ra_submit inline

On Thu, 20 Mar 2014 22:53:25 +0100 Fabian Frederick <fabf@...net.be> wrote:

> f9acc8c7b35a10 ("readahead: sanify file_ra_state names")
> left ra_submit with a single function call.
> 
> Add 'inline' to save some stack (suggested by Andrew Morton).
> 
> --- a/mm/readahead.c
> +++ b/mm/readahead.c
> @@ -246,7 +246,7 @@ unsigned long max_sane_readahead(unsigned long nr)
>  /*
>   * Submit IO for the read-ahead request in file_ra_state.
>   */
> -unsigned long ra_submit(struct file_ra_state *ra,
> +inline unsigned long ra_submit(struct file_ra_state *ra,
>  		       struct address_space *mapping, struct file *filp)
>  {
>  	int actual;

The ra_submit() callsite in filemap.c will not be able to inline this
function because its definition is unavailable at compilation time.

ra_submit() should be made static inline and moved into a header file
which all callers include.  Probably in mm.h's /* readahead */ section.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ