All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2:master 5/9] fs/gfs2/trans.c:176 databuf_lo_add() error: we previously assumed 'tr' could be null (see line 168)
Date: Fri, 04 Jan 2013 09:51:14 +0000	[thread overview]
Message-ID: <1357293074.2700.2.camel@menhir> (raw)
In-Reply-To: <20130104093954.GH7302@mwanda>

Hi,

On Fri, 2013-01-04 at 12:39 +0300, Dan Carpenter wrote:
> [ It could be that gfs2_is_jdata(ip) implies tr is non-NULL, I'm not
>   familiar enough with the subsystem to say ].
> 
Yes, it does. The code should not have changed, I just reorganised it,
so I guess that was enough to get this warning flagged up,

Steve.

> Hi Steven,
> 
> FYI, there are new smatch warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git master
> head:   e525d6d182bb81599fc5da017fcd23b21623630e
> commit: ef9151d84b94affb7371fbc9dd7074d1c85d6fc3 [5/9] GFS2: Copy gfs2_trans_add_bh into new data/meta functions
> 
> + fs/gfs2/trans.c:176 databuf_lo_add() error: we previously assumed 'tr' could be null (see line 168)
> 
> git remote add gfs2 git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git
> git remote update gfs2
> git checkout ef9151d84b94affb7371fbc9dd7074d1c85d6fc3
> vim +/tr +176 fs/gfs2/trans.c
> 
> ef9151d8 Steven Whitehouse 2012-12-14  162  static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
> ef9151d8 Steven Whitehouse 2012-12-14  163  {
> ef9151d8 Steven Whitehouse 2012-12-14  164  	struct gfs2_trans *tr = current->journal_info;
> ef9151d8 Steven Whitehouse 2012-12-14  165  	struct address_space *mapping = bd->bd_bh->b_page->mapping;
> ef9151d8 Steven Whitehouse 2012-12-14  166  	struct gfs2_inode *ip = GFS2_I(mapping->host);
> ef9151d8 Steven Whitehouse 2012-12-14  167  
> ef9151d8 Steven Whitehouse 2012-12-14 @168  	if (tr)
> ef9151d8 Steven Whitehouse 2012-12-14  169  		tr->tr_touched = 1;
> ef9151d8 Steven Whitehouse 2012-12-14  170  	if (!list_empty(&bd->bd_list))
> ef9151d8 Steven Whitehouse 2012-12-14  171  		return;
> ef9151d8 Steven Whitehouse 2012-12-14  172  	set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
> ef9151d8 Steven Whitehouse 2012-12-14  173  	set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
> ef9151d8 Steven Whitehouse 2012-12-14  174  	if (gfs2_is_jdata(ip)) {
> ef9151d8 Steven Whitehouse 2012-12-14  175  		gfs2_pin(sdp, bd->bd_bh);
> ef9151d8 Steven Whitehouse 2012-12-14 @176  		tr->tr_num_databuf_new++;
> ef9151d8 Steven Whitehouse 2012-12-14  177  		sdp->sd_log_num_databuf++;
> ef9151d8 Steven Whitehouse 2012-12-14  178  		list_add_tail(&bd->bd_list, &sdp->sd_log_le_databuf);
> ef9151d8 Steven Whitehouse 2012-12-14  179  	} else {
> 
> ---
> 0-DAY kernel build testing backend         Open Source Technology Center
> Fengguang Wu, Yuanhan Liu                              Intel Corporation




      reply	other threads:[~2013-01-04  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04  9:39 [Cluster-devel] [gfs2:master 5/9] fs/gfs2/trans.c:176 databuf_lo_add() error: we previously assumed 'tr' could be null (see line 168) Dan Carpenter
2013-01-04  9:51 ` Steven Whitehouse [this message]

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=1357293074.2700.2.camel@menhir \
    --to=swhiteho@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.