]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ocfs2: make mlog_errno return the errno
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Apr 2015 22:43:52 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2015 23:48:58 +0000 (16:48 -0700)
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>
fs/ocfs2/cluster/masklog.h

index 2260fb9e650831fef349ce2c6f6dcd878ffa45d2..7fdc25a4d8c0e76af574c505d83eb86f1f452e31 100644 (file)
@@ -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) {                                                     \