diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-04-14 18:43:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:48:58 -0400 |
commit | 1d5b897706d11ac59fecd85ba7b1cbf91c44fe50 (patch) | |
tree | d49f88710c1cb512458dce9f96d01a6cbd926389 | |
parent | 2f2eca20a09dac0e9d62bf57ce6a0c6ef6cf91e6 (diff) |
ocfs2: make mlog_errno return the errno
ocfs2 does
mlog_errno(v);
return v;
in many places. Change mlog_errno() so we can do
return mlog_errno(v);
For some weird reason this patch reduces the size of ocfs2 by 6k:
akpm3:/usr/src/25> size fs/ocfs2/ocfs2.ko
text data bss dec hex filename
1146613 82767 832192 2061572 1f7504 fs/ocfs2/ocfs2.ko-before
1140857 82767 832192 2055816 1f5e88 fs/ocfs2/ocfs2.ko-after
[dan.carpenter@oracle.com: double evaluation concerns in mlog_errno()]
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: alex chen <alex.chen@huawei.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 2260fb9e6508..7fdc25a4d8c0 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -196,13 +196,14 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; | |||
196 | } \ | 196 | } \ |
197 | } while (0) | 197 | } while (0) |
198 | 198 | ||
199 | #define mlog_errno(st) do { \ | 199 | #define mlog_errno(st) ({ \ |
200 | int _st = (st); \ | 200 | int _st = (st); \ |
201 | if (_st != -ERESTARTSYS && _st != -EINTR && \ | 201 | if (_st != -ERESTARTSYS && _st != -EINTR && \ |
202 | _st != AOP_TRUNCATED_PAGE && _st != -ENOSPC && \ | 202 | _st != AOP_TRUNCATED_PAGE && _st != -ENOSPC && \ |
203 | _st != -EDQUOT) \ | 203 | _st != -EDQUOT) \ |
204 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ | 204 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ |
205 | } while (0) | 205 | _st; \ |
206 | }) | ||
206 | 207 | ||
207 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ | 208 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ |
208 | if (cond) { \ | 209 | if (cond) { \ |