public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] xfs: remove an unneeded NULL check
@ 2012-01-28 10:55 Dan Carpenter
  2012-01-31 22:04 ` [NOTES] " Phil White
  2012-01-31 22:56 ` Dave Chinner
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Carpenter @ 2012-01-28 10:55 UTC (permalink / raw)
  To: Ben Myers; +Cc: xfs-masters, Alex Elder, kernel-janitors, xfs

Smatch complains because we check "commit_lsn" for NULL inconsistently.
fs/xfs/xfs_log_cil.c +705 xfs_log_commit_cil(43) error: we previously
	assumed 'commit_lsn' could be null (see line 688)
xfs_log_commit_cil() is only called from one place, and "commit_lsn" is
a valid pointer, so I've removed the NULL check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index d4fadbe..d9c4652 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -685,8 +685,7 @@ xfs_log_commit_cil(
 
 	/* lock out background commit */
 	down_read(&log->l_cilp->xc_ctx_lock);
-	if (commit_lsn)
-		*commit_lsn = log->l_cilp->xc_ctx->sequence;
+	*commit_lsn = log->l_cilp->xc_ctx->sequence;
 
 	xlog_cil_insert_items(log, log_vector, tp->t_ticket);
 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-01 23:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-28 10:55 [patch] xfs: remove an unneeded NULL check Dan Carpenter
2012-01-31 22:04 ` [NOTES] " Phil White
2012-01-31 22:56 ` Dave Chinner
2012-01-31 23:08   ` Ben Myers
2012-02-01 10:45   ` Christoph Hellwig
2012-02-01 21:13     ` Dave Chinner
2012-02-01 21:15       ` Christoph Hellwig
2012-02-01 23:16         ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox