From: Ingo Molnar <mingo@elte.hu>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>,
linux-kernel@vger.kernel.org,
Russell Cattelan <cattelan@redhat.com>,
David Teigland <teigland@redhat.com>,
hch@infradead.org
Subject: Re: [PATCH 03/16] GFS2: bmap and inode functions
Date: Sat, 2 Sep 2006 08:09:40 +0200 [thread overview]
Message-ID: <20060902060939.GB16484@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.61.0609011355410.15283@yvahk01.tjqt.qr>
* Jan Engelhardt <jengelh@linux01.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
next prev parent reply other threads:[~2006-09-02 6:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 13:30 Steven Whitehouse
2006-09-01 12:43 ` Jan Engelhardt
2006-09-02 6:09 ` Ingo Molnar [this message]
2006-09-02 7:16 ` Jan Engelhardt
2006-09-02 16:23 ` Ingo Molnar
2006-09-02 16:25 ` Ingo Molnar
2006-09-02 18:26 ` Jan Engelhardt
2006-09-02 18:47 ` Ingo Molnar
2006-09-05 20:18 ` Pavel Machek
2006-09-04 13:01 ` Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2006-04-21 16:11 Steven Whitehouse
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=20060902060939.GB16484@elte.hu \
--to=mingo@elte.hu \
--cc=cattelan@redhat.com \
--cc=hch@infradead.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=teigland@redhat.com \
/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
all inboxes | Powered by JetHome®