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: <20060902060939.GB16484@elte.hu>
Date:	Sat, 2 Sep 2006 08:09:40 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	Steven Whitehouse <swhiteho@...hat.com>,
	linux-kernel@...r.kernel.org,
	Russell Cattelan <cattelan@...hat.com>,
	David Teigland <teigland@...hat.com>, hch@...radead.org
Subject: Re: [PATCH 03/16] GFS2: bmap and inode functions


* Jan Engelhardt <jengelh@...ux01.gwdg.de> wrote:

> >+	if (!PageUptodate(page)) {
> 
> BTW (general question), who had the idea of developing so many 
> camelcase-named VM functions?

Linus :-) It's a reminder that the HungarianNotationIsAReallyBadIdea ;)

> >+	for (i = ip->i_di.di_height; i--;)
> >+		mp->mp_list[i] = (__u16)do_div(b, sdp->sd_inptrs);
> 
> Drop the cast if possible. do_div returns an integer.

hm, do we need an explicit do_div() in fact, why not just "b / inptrs"?

> >+static inline u64 *metapointer(struct buffer_head *bh, int *boundary,
> >+			       unsigned int height, const struct metapath *mp)
> >+{
> >+	unsigned int head_size = (height > 0) ?
> >+		sizeof(struct gfs2_meta_header) : sizeof(struct gfs2_dinode);
> >+	u64 *ptr;
> >+	*boundary = 0;
> >+	ptr = ((u64 *)(bh->b_data + head_size)) + mp->mp_list[height];
> >+	if (ptr + 1 == (u64*)(bh->b_data + bh->b_size))
>                            ^
> Add a space, to go in line with the other casts.

and add a newline after variable definitions. The cast is probably not 
even needed, because b_data is void *.

> How about inverting the if() to:
> 
> 	if(ip == NULL)
> 		return;
> 	if(test_bit(GLF_DIRTY, &gl->gl_flags))
> 		gfs_inode_attr_in(ip);
> 	gfs2_meta_cache_flush(ip);

btw., it should be "if (", not "if(".

	Ingo

-- 
VGER BF report: H 0.0197994
-
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