aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
committerTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
commitc1e8d35ef5ffb393b94a192034b5e3541e005d75 (patch)
treeb9a7f089acd3408c2835a3dfd6aa7bb0407587b3 /fs/ocfs2/namei.c
parentef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (diff)
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>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c47
1 files changed, 31 insertions, 16 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index fdf5c0b75caa..8a13226eb1a2 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -182,7 +182,7 @@ bail_unlock:
182 182
183bail: 183bail:
184 184
185 mlog_exit_ptr(ret); 185 mlog(0, "%p\n", ret);
186 186
187 return ret; 187 return ret;
188} 188}
@@ -466,7 +466,8 @@ leave:
466 iput(inode); 466 iput(inode);
467 } 467 }
468 468
469 mlog_exit(status); 469 if (status)
470 mlog_errno(status);
470 471
471 return status; 472 return status;
472} 473}
@@ -577,7 +578,8 @@ leave:
577 } 578 }
578 } 579 }
579 580
580 mlog_exit(status); 581 if (status)
582 mlog_errno(status);
581 return status; 583 return status;
582} 584}
583 585
@@ -618,7 +620,8 @@ static int ocfs2_mkdir(struct inode *dir,
618 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode, 620 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
619 dentry->d_name.len, dentry->d_name.name); 621 dentry->d_name.len, dentry->d_name.name);
620 ret = ocfs2_mknod(dir, dentry, mode | S_IFDIR, 0); 622 ret = ocfs2_mknod(dir, dentry, mode | S_IFDIR, 0);
621 mlog_exit(ret); 623 if (ret)
624 mlog_errno(ret);
622 625
623 return ret; 626 return ret;
624} 627}
@@ -633,7 +636,8 @@ static int ocfs2_create(struct inode *dir,
633 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode, 636 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
634 dentry->d_name.len, dentry->d_name.name); 637 dentry->d_name.len, dentry->d_name.name);
635 ret = ocfs2_mknod(dir, dentry, mode | S_IFREG, 0); 638 ret = ocfs2_mknod(dir, dentry, mode | S_IFREG, 0);
636 mlog_exit(ret); 639 if (ret)
640 mlog_errno(ret);
637 641
638 return ret; 642 return ret;
639} 643}
@@ -757,7 +761,8 @@ out:
757 761
758 ocfs2_free_dir_lookup_result(&lookup); 762 ocfs2_free_dir_lookup_result(&lookup);
759 763
760 mlog_exit(err); 764 if (err)
765 mlog_errno(err);
761 766
762 return err; 767 return err;
763} 768}
@@ -954,7 +959,8 @@ leave:
954 ocfs2_free_dir_lookup_result(&orphan_insert); 959 ocfs2_free_dir_lookup_result(&orphan_insert);
955 ocfs2_free_dir_lookup_result(&lookup); 960 ocfs2_free_dir_lookup_result(&lookup);
956 961
957 mlog_exit(status); 962 if (status)
963 mlog_errno(status);
958 964
959 return status; 965 return status;
960} 966}
@@ -1025,7 +1031,8 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,
1025 } 1031 }
1026 1032
1027bail: 1033bail:
1028 mlog_exit(status); 1034 if (status)
1035 mlog_errno(status);
1029 return status; 1036 return status;
1030} 1037}
1031 1038
@@ -1476,7 +1483,8 @@ bail:
1476 brelse(old_dir_bh); 1483 brelse(old_dir_bh);
1477 brelse(new_dir_bh); 1484 brelse(new_dir_bh);
1478 1485
1479 mlog_exit(status); 1486 if (status)
1487 mlog_errno(status);
1480 1488
1481 return status; 1489 return status;
1482} 1490}
@@ -1579,7 +1587,8 @@ bail:
1579 kfree(bhs); 1587 kfree(bhs);
1580 } 1588 }
1581 1589
1582 mlog_exit(status); 1590 if (status)
1591 mlog_errno(status);
1583 return status; 1592 return status;
1584} 1593}
1585 1594
@@ -1835,7 +1844,8 @@ bail:
1835 iput(inode); 1844 iput(inode);
1836 } 1845 }
1837 1846
1838 mlog_exit(status); 1847 if (status)
1848 mlog_errno(status);
1839 1849
1840 return status; 1850 return status;
1841} 1851}
@@ -1865,7 +1875,8 @@ static int ocfs2_blkno_stringify(u64 blkno, char *name)
1865 1875
1866 status = 0; 1876 status = 0;
1867bail: 1877bail:
1868 mlog_exit(status); 1878 if (status < 0)
1879 mlog_errno(status);
1869 return status; 1880 return status;
1870} 1881}
1871 1882
@@ -1978,7 +1989,8 @@ out:
1978 iput(orphan_dir_inode); 1989 iput(orphan_dir_inode);
1979 } 1990 }
1980 1991
1981 mlog_exit(ret); 1992 if (ret)
1993 mlog_errno(ret);
1982 return ret; 1994 return ret;
1983} 1995}
1984 1996
@@ -2060,7 +2072,8 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb,
2060leave: 2072leave:
2061 brelse(orphan_dir_bh); 2073 brelse(orphan_dir_bh);
2062 2074
2063 mlog_exit(status); 2075 if (status)
2076 mlog_errno(status);
2064 return status; 2077 return status;
2065} 2078}
2066 2079
@@ -2120,7 +2133,8 @@ int ocfs2_orphan_del(struct ocfs2_super *osb,
2120leave: 2133leave:
2121 ocfs2_free_dir_lookup_result(&lookup); 2134 ocfs2_free_dir_lookup_result(&lookup);
2122 2135
2123 mlog_exit(status); 2136 if (status)
2137 mlog_errno(status);
2124 return status; 2138 return status;
2125} 2139}
2126 2140
@@ -2472,7 +2486,8 @@ leave:
2472 2486
2473 ocfs2_free_dir_lookup_result(&lookup); 2487 ocfs2_free_dir_lookup_result(&lookup);
2474 2488
2475 mlog_exit(status); 2489 if (status)
2490 mlog_errno(status);
2476 2491
2477 return status; 2492 return status;
2478} 2493}