Skip to content

Commit

Permalink
ocfs2: make mlog_errno return the errno
Browse files Browse the repository at this point in the history
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

[[email protected]: double evaluation concerns in mlog_errno()]
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: alex chen <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Apr 14, 2015
1 parent 2f2eca2 commit 1d5b897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ocfs2/cluster/masklog.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,14 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
} \
} while (0)

#define mlog_errno(st) do { \
#define mlog_errno(st) ({ \
int _st = (st); \
if (_st != -ERESTARTSYS && _st != -EINTR && \
_st != AOP_TRUNCATED_PAGE && _st != -ENOSPC && \
_st != -EDQUOT) \
mlog(ML_ERROR, "status = %lld\n", (long long)_st); \
} while (0)
_st; \
})

#define mlog_bug_on_msg(cond, fmt, args...) do { \
if (cond) { \
Expand Down

0 comments on commit 1d5b897

Please sign in to comment.