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:	Wed, 15 Feb 2012 15:57:47 -0800
From:	Arun Sharma <asharma@...com>
To:	Andrea Righi <andrea@...terlinux.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan.kim@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Johannes Weiner <jweiner@...hat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Rik van Riel <riel@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Shaohua Li <shaohua.li@...el.com>,
	Pádraig Brady <P@...igBrady.com>,
	John Stultz <john.stultz@...aro.org>,
	Jerry James <jamesjer@...terlinux.com>,
	Julius Plenz <julius@...nz.com>, linux-mm <linux-mm@...ck.org>,
	<linux-fsdevel@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 3/3] fadvise: implement POSIX_FADV_NOREUSE



On 2/15/12 3:47 PM, Andrea Righi wrote:
>> index 74b6a97..b4e45e6 100644
>> --- a/include/linux/fs.h
>> +++ b/include/linux/fs.h
>> @@ -9,7 +9,6 @@
>>   #include<linux/limits.h>
>>   #include<linux/ioctl.h>
>>   #include<linux/blk_types.h>
>> -#include<linux/kinterval.h>
>>   #include<linux/types.h>
>>
>>   /*
>> @@ -656,7 +655,7 @@ struct address_space {
>>   	spinlock_t		private_lock;	/* for use by the address_space */
>>   	struct list_head	private_list;	/* ditto */
>>   	struct address_space	*assoc_mapping;	/* ditto */
>> -	struct rb_root		nocache_tree;	/* noreuse cache range tree */
>> +	void			*nocache_tree;	/* noreuse cache range tree */
>>   	rwlock_t		nocache_lock;	/* protect the nocache_tree */
>>   } __attribute__((aligned(sizeof(long))));
>>   	/*
>
> mmh.. a forward declaration of rb_root in fs.h shouldn't be better than
> this?
>

Forward declaration works if the type was struct rb_root *. But the type 
in your patch was a struct and the compiler can't figure out its size.

include/linux/fs.h:659:17: error: field ‘nocache_tree’ has incomplete type

Did you mean forward declaring struct rb_node instead of rb_root?

If we go down this path, a few more places need fixups (I ignored the 
compiler warnings about casting void * to struct rb_root *).

  -Arun

--
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