mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: Daeseok Youn <daeseok.youn@gmail.com>
Cc: <mfasheh@suse.com>, <akpm@linux-foundation.org>,
	<richard.weinberger@gmail.com>, <ocfs2-devel@oss.oracle.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
Date: Thu, 19 Mar 2015 19:00:27 +0800	[thread overview]
Message-ID: <550AAC4B.8000505@huawei.com> (raw)
In-Reply-To: <20150227235100.GA12964@devel.8.8.4.4>

On 2015/2/28 7:51, Daeseok Youn wrote:
> There is no error handle when ocfs2_journal_access_di() is failed.
> And also it doesn't need to call ocfs2_dx_dir_insert() when
> ocfs2_journal_access_db() is failed.
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> RESEND: this patch rebased by 1/4
> 
>  fs/ocfs2/dir.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c1ab24f..c63f2b6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
>  								 insert_bh,
>  					      OCFS2_JOURNAL_ACCESS_WRITE);
>  
> -				if (ocfs2_dir_indexed(dir)) {
> +				if (!retval && ocfs2_dir_indexed(dir))
>  					retval = ocfs2_dx_dir_insert(dir,
>  								handle,
>  								lookup);
> -					if (retval)
> -						goto bail;
> -				}
>  			}
>  
> +			if (retval)
> +				goto bail;
> +
>  			/* By now the buffer is marked for journaling */
>  			offset += le16_to_cpu(de->rec_len);
>  			if (le64_to_cpu(de->inode)) {
> 
I agree with you that we should do the corresponding check.
But I don't think we need remove the mlog as described in my previous
mail.


  reply	other threads:[~2015-03-19 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 23:51 Daeseok Youn
2015-03-19 11:00 ` Joseph Qi [this message]
2015-03-20  2:34   ` [Ocfs2-devel] " DaeSeok Youn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=550AAC4B.8000505@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=daeseok.youn@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=richard.weinberger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome