Linux ocfs2 filesystem development
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH v2] ocfs2_direct_IO_write misses ocfs2_is_overwrite error code
Date: Mon, 7 Sep 2015 15:10:11 +0800	[thread overview]
Message-ID: <55ED3853.6070809@huawei.com> (raw)
In-Reply-To: <55ED2F7F.80109@huawei.com>

On 2015/9/7 14:32, Norton.Zhu wrote:
> If ocfs2_is_overwrite failed, ocfs2_direct_IO_write may still return success to the caller.
> changelog:
> Using mlog_errno(ret) looks better than mlog_errno(is_overwrite)
> 
> Signed-off-by: Norton.Zhu <norton.zhu@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>

> ---
>  aops.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/aops.c b/aops.c
> index 0f5fd9d..01bbc56 100644
> --- a/aops.c
> +++ b/aops.c
> @@ -846,7 +846,8 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb,
> 
>  		is_overwrite = ocfs2_is_overwrite(osb, inode, offset);
>  		if (is_overwrite < 0) {
> -			mlog_errno(is_overwrite);
> +			ret = is_overwrite;
> +			mlog_errno(ret);
>  			ocfs2_inode_unlock(inode, 1);
>  			goto clean_orphan;
>  		}
> 

      reply	other threads:[~2015-09-07  7:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07  6:32 [Ocfs2-devel] [PATCH v2] ocfs2_direct_IO_write misses ocfs2_is_overwrite error code Norton.Zhu
2015-09-07  7:10 ` Joseph Qi [this message]

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=55ED3853.6070809@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=ocfs2-devel@oss.oracle.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