]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ocfs2: double evaluation concerns in mlog_errno()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Apr 2015 23:43:56 +0000 (09:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:43:56 +0000 (09:43 +1000)
It won't happen in real life, but for consistency etc then we should
only evaluate the "st" parameter once.

Also, since not all callers use the new return, it causes at static
checker warning:
fs/ocfs2/export.c:138 ocfs2_get_dentry() warn: unchecked 'PTR_ERR'

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: alex chen <alex.chen@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/cluster/masklog.h

index f96a51dd4be847d18119900b1fd4c495cee5489d..7fdc25a4d8c0e76af574c505d83eb86f1f452e31 100644 (file)
@@ -202,7 +202,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
            _st != AOP_TRUNCATED_PAGE && _st != -ENOSPC &&              \
            _st != -EDQUOT)                                             \
                mlog(ML_ERROR, "status = %lld\n", (long long)_st);      \
-       st;                                                             \
+       _st;                                                            \
 })
 
 #define mlog_bug_on_msg(cond, fmt, args...) do {                       \