| To: | Ben Myers <bpm@xxxxxxx> |
|---|---|
| Subject: | [patch] xfs: remove an unneeded NULL check |
| From: | Dan Carpenter <dan.carpenter@xxxxxxxxxx> |
| Date: | Sat, 28 Jan 2012 13:55:01 +0300 |
| Cc: | Alex Elder <elder@xxxxxxxxxx>, xfs-masters@xxxxxxxxxxx, xfs@xxxxxxxxxxx, kernel-janitors@xxxxxxxxxxxxxxx |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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@xxxxxxxxxx>
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);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS for-next branch, Stephen Rothwell |
|---|---|
| Next by Date: | Confirmar a sua conta de e-mail agora!, Webmail Técnico Suporte® |
| Previous by Thread: | [RFC PATCH] xfs: pass KM_SLEEP flag to kmem_realloc() in xlog_recover_add_to_cnt_trans(), Mitsuo Hayasaka |
| Next by Thread: | Re: [patch] xfs: remove an unneeded NULL check, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |