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]
Date:	Thu, 28 Dec 2006 11:55:10 +0000
From:	Christoph Hellwig <hch@...radead.org>
To:	Suparna Bhattacharya <suparna@...ibm.com>
Cc:	linux-aio@...ck.org, akpm@...l.org, drepper@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	jakub@...hat.com, mingo@...e.hu
Subject: Re: [FSAIO][PATCH 6/8] Enable asynchronous wait page and lock page

On Thu, Dec 28, 2006 at 02:11:49PM +0530, Suparna Bhattacharya wrote:
> -extern void FASTCALL(lock_page_slow(struct page *page));
> +extern int FASTCALL(__lock_page_slow(struct page *page, wait_queue_t *wait));
>  extern void FASTCALL(__lock_page_nosync(struct page *page));
>  extern void FASTCALL(unlock_page(struct page *page));
>  
>  /*
>   * lock_page may only be called if we have the page's inode pinned.
>   */
> -static inline void lock_page(struct page *page)
> +static inline int __lock_page(struct page *page, wait_queue_t *wait)
>  {
>  	might_sleep();
>  	if (TestSetPageLocked(page))
> -		lock_page_slow(page);
> +		return __lock_page_slow(page, wait);
> +	return 0;
>  }
>  
> +#define lock_page(page)		__lock_page(page, &current->__wait.wait)
> +#define lock_page_slow(page)	__lock_page_slow(page, &current->__wait.wait)

Can we please simply kill your lock_page_slow wrapper and rename the
arguments taking __lock_page_slow to lock_page_slow?  All too many
variants of the locking functions aren't all that useful and there's
very few users.

Similarly I don't really think __lock_page is an all that useful name here.
What about lock_page_wq?  or aio_lock_page to denote it has special
meaning in aio contect?  Then again because of these special sematics
we need a bunch of really verbose kerneldoc comments for this function
famility.

-
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