From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Qi Date: Thu, 19 Mar 2015 18:45:26 +0800 Subject: [Ocfs2-devel] [PATCH 2/4 RESEND] ocfs2: remove extra mlog_errno() call in __ocfs2_add_entry() In-Reply-To: <20150227234958.GA12945@devel.8.8.4.4> References: <20150227234958.GA12945@devel.8.8.4.4> Message-ID: <550AA8C6.5080108@huawei.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Daeseok Youn Cc: mfasheh@suse.com, akpm@linux-foundation.org, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org On 2015/2/28 7:49, Daeseok Youn wrote: > Signed-off-by: Daeseok Youn > --- > RESEND: this patch is rebased by 1/4 > > fs/ocfs2/dir.c | 8 ++------ > 1 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c > index 1478a50..c1ab24f 100644 > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -1689,10 +1689,8 @@ int __ocfs2_add_entry(handle_t *handle, > if (ocfs2_dirent_would_fit(de, rec_len)) { > dir->i_mtime = dir->i_ctime = CURRENT_TIME; > retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh); > - if (retval < 0) { > - mlog_errno(retval); > + if (retval < 0) > goto bail; > - } > > if (insert_bh == parent_fe_bh) > retval = ocfs2_journal_access_di(handle, > @@ -1709,10 +1707,8 @@ int __ocfs2_add_entry(handle_t *handle, > retval = ocfs2_dx_dir_insert(dir, > handle, > lookup); > - if (retval) { > - mlog_errno(retval); > + if (retval) > goto bail; > - } > } > } > > IMO, these two mlogs are not "extra" because we can directly know the cause if error occurs. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754364AbbCSKpp (ORCPT ); Thu, 19 Mar 2015 06:45:45 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:51306 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbbCSKpo (ORCPT ); Thu, 19 Mar 2015 06:45:44 -0400 Message-ID: <550AA8C6.5080108@huawei.com> Date: Thu, 19 Mar 2015 18:45:26 +0800 From: Joseph Qi User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Daeseok Youn CC: , , , Subject: Re: [Ocfs2-devel] [PATCH 2/4 RESEND] ocfs2: remove extra mlog_errno() call in __ocfs2_add_entry() References: <20150227234958.GA12945@devel.8.8.4.4> In-Reply-To: <20150227234958.GA12945@devel.8.8.4.4> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.24.125] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/2/28 7:49, Daeseok Youn wrote: > Signed-off-by: Daeseok Youn > --- > RESEND: this patch is rebased by 1/4 > > fs/ocfs2/dir.c | 8 ++------ > 1 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c > index 1478a50..c1ab24f 100644 > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -1689,10 +1689,8 @@ int __ocfs2_add_entry(handle_t *handle, > if (ocfs2_dirent_would_fit(de, rec_len)) { > dir->i_mtime = dir->i_ctime = CURRENT_TIME; > retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh); > - if (retval < 0) { > - mlog_errno(retval); > + if (retval < 0) > goto bail; > - } > > if (insert_bh == parent_fe_bh) > retval = ocfs2_journal_access_di(handle, > @@ -1709,10 +1707,8 @@ int __ocfs2_add_entry(handle_t *handle, > retval = ocfs2_dx_dir_insert(dir, > handle, > lookup); > - if (retval) { > - mlog_errno(retval); > + if (retval) > goto bail; > - } > } > } > > IMO, these two mlogs are not "extra" because we can directly know the cause if error occurs.