ocfs2: Remove EXIT from masklog.
mlog_exit is used to record the exit status of a function.
But because it is added in so many functions, if we enable it,
the system logs get filled up quickly and cause too much I/O.
So actually no one can open it for a production system or even
for a test.
This patch just try to remove it or change it. So:
1. if all the error paths already use mlog_errno, it is just removed.
Otherwise, it will be replaced by mlog_errno.
2. if it is used to print some return value, it is replaced with
mlog(0,...).
mlog_exit_ptr is changed to mlog(0.
All those mlog(0,...) will be replaced with trace events later.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 71375d7..1e1a93a 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -135,7 +135,6 @@
}
leave:
- mlog_exit(status);
return status;
}
@@ -154,8 +153,6 @@
ocfs2_free_file_private(inode, file);
- mlog_exit(0);
-
return 0;
}
@@ -195,7 +192,8 @@
err = jbd2_journal_force_commit(journal);
bail:
- mlog_exit(err);
+ if (err)
+ mlog_errno(err);
return (err < 0) ? -EIO : 0;
}
@@ -278,7 +276,6 @@
out_commit:
ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle);
out:
- mlog_exit(ret);
return ret;
}
@@ -300,7 +297,6 @@
}
bail:
- mlog_exit(status);
return status;
}
@@ -424,8 +420,6 @@
out_commit:
ocfs2_commit_trans(osb, handle);
out:
-
- mlog_exit(status);
return status;
}
@@ -520,7 +514,6 @@
if (!status && OCFS2_I(inode)->ip_clusters == 0)
status = ocfs2_try_remove_refcount_tree(inode, di_bh);
- mlog_exit(status);
return status;
}
@@ -713,7 +706,6 @@
brelse(bh);
bh = NULL;
- mlog_exit(status);
return status;
}
@@ -1269,7 +1261,6 @@
mlog_errno(status);
}
- mlog_exit(status);
return status;
}
@@ -1295,8 +1286,6 @@
stat->blksize = osb->s_clustersize;
bail:
- mlog_exit(err);
-
return err;
}
@@ -1318,7 +1307,6 @@
ocfs2_inode_unlock(inode, 0);
out:
- mlog_exit(ret);
return ret;
}
@@ -1359,7 +1347,6 @@
out_trans:
ocfs2_commit_trans(osb, handle);
out:
- mlog_exit(ret);
return ret;
}
@@ -2393,7 +2380,6 @@
if (written)
ret = written;
- mlog_exit(ret);
return ret;
}
@@ -2476,7 +2462,6 @@
balance_dirty_pages_ratelimited_nr(mapping, nr_pages);
}
- mlog_exit(ret);
return ret;
}
@@ -2507,7 +2492,6 @@
ret = generic_file_splice_read(in, ppos, pipe, len, flags);
bail:
- mlog_exit(ret);
return ret;
}
@@ -2588,7 +2572,6 @@
}
if (rw_level != -1)
ocfs2_rw_unlock(inode, rw_level);
- mlog_exit(ret);
return ret;
}