linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
	Ojaswin Mujoo <ojaswin@linux.ibm.com>,
	Disha Goel <disgoel@linux.ibm.com>
Subject: Re: [RFCv3 09/10] iomap: Minor refactor of iomap_dio_rw
Date: Thu, 13 Apr 2023 07:35:30 -0700	[thread overview]
Message-ID: <20230413143530.GC360877@frogsfrogsfrogs> (raw)
In-Reply-To: <ac0b5e5778585f8d02b4abc355f185cba261b239.1681365596.git.ritesh.list@gmail.com>

On Thu, Apr 13, 2023 at 02:10:31PM +0530, Ritesh Harjani (IBM) wrote:
> The next patch brings in the tracepoint patch for iomap DIO functions.
> This is a small refactor change for having a single out path.
> 
> Tested-by: Disha Goel <disgoel@linux.ibm.com>
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

IMHO this could've been part of the next patch instead of separate, but
eh, whatever, looks good to me.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/iomap/direct-io.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index 36ab1152dbea..5871956ee880 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -679,11 +679,16 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
>  		unsigned int dio_flags, void *private, size_t done_before)
>  {
>  	struct iomap_dio *dio;
> +	ssize_t ret = 0;
>  
>  	dio = __iomap_dio_rw(iocb, iter, ops, dops, dio_flags, private,
>  			     done_before);
> -	if (IS_ERR_OR_NULL(dio))
> -		return PTR_ERR_OR_ZERO(dio);
> -	return iomap_dio_complete(dio);
> +	if (IS_ERR_OR_NULL(dio)) {
> +		ret = PTR_ERR_OR_ZERO(dio);
> +		goto out;
> +	}
> +	ret = iomap_dio_complete(dio);
> +out:
> +	return ret;
>  }
>  EXPORT_SYMBOL_GPL(iomap_dio_rw);
> -- 
> 2.39.2
> 

  reply	other threads:[~2023-04-13 14:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  8:40 [RFCv3 00/10] ext2: DIO to use iomap Ritesh Harjani (IBM)
2023-04-13  8:40 ` [RFCv3 01/10] ext2/dax: Fix ext2_setsize when len is page aligned Ritesh Harjani (IBM)
2023-04-13  8:40 ` [RFCv3 02/10] libfs: Add __generic_file_fsync_nolock implementation Ritesh Harjani (IBM)
2023-04-14  5:59   ` Christoph Hellwig
2023-04-14 12:51     ` Jan Kara
2023-04-14 13:12       ` Christoph Hellwig
2023-04-14 14:20         ` Jan Kara
2023-04-14 14:29           ` Ritesh Harjani
2023-04-17  7:32             ` Jan Kara
2023-04-17 10:01               ` Ritesh Harjani
2023-04-13  8:40 ` [RFCv3 03/10] ext4: Use " Ritesh Harjani (IBM)
2023-04-13  8:40 ` [RFCv3 04/10] ext2: " Ritesh Harjani (IBM)
2023-04-13  8:40 ` [RFCv3 05/10] ext2: Move direct-io to use iomap Ritesh Harjani (IBM)
2023-04-13  8:40 ` [RFCv3 06/10] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Ritesh Harjani (IBM)
2023-04-13  9:54   ` Christian Brauner
2023-04-13 10:15     ` Ritesh Harjani
2023-04-13  8:40 ` [RFCv3 07/10] ext2: Add direct-io " Ritesh Harjani (IBM)
2023-04-14  6:00   ` Christoph Hellwig
2023-04-14  8:06     ` Ritesh Harjani
2023-04-13  8:40 ` [RFCv3 08/10] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag Ritesh Harjani (IBM)
2023-04-13 14:34   ` Darrick J. Wong
2023-04-13  8:40 ` [RFCv3 09/10] iomap: Minor refactor of iomap_dio_rw Ritesh Harjani (IBM)
2023-04-13 14:35   ` Darrick J. Wong [this message]
2023-04-14  6:00     ` Christoph Hellwig
2023-04-13  8:40 ` [RFCv3 10/10] iomap: Add trace points for DIO path Ritesh Harjani (IBM)
2023-04-13 14:42   ` Darrick J. Wong
2023-04-13 20:18     ` Ritesh Harjani
2023-04-14  2:16       ` Darrick J. Wong
2023-04-14  5:21         ` Ritesh Harjani
2023-04-14  6:04   ` Christoph Hellwig
2023-04-14  7:56     ` Ritesh Harjani
2023-04-14 13:06       ` Christoph Hellwig
2023-04-14 14:38         ` Ritesh Harjani

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=20230413143530.GC360877@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=disgoel@linux.ibm.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@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;
as well as URLs for NNTP newsgroup(s).