[PATCH v3 4/4] ext4: support uncached buffered I/O
Matthew Wilcox
willy at infradead.org
Thu Jul 3 11:45:53 UTC 2025
On Sun, Jun 29, 2025 at 11:41:12PM -0700, hch at infradead.org wrote:
> On Fri, Jun 27, 2025 at 06:03:09PM +0100, Matthew Wilcox wrote:
> > On Fri, Jun 27, 2025 at 11:03:13AM +0000, 陈涛涛 Taotao Chen wrote:
> > I think this needs to be:
> >
> > if (iocb && iocb->ki_flags & IOCB_DONTCACHE)
> >
> > because it's legit to call write_begin with a NULL argument. The
> > 'file' was always an optional argument, and we should preserve that
> > optionality with this transformation.
>
> write_begin and write_end are only callbacks through helpers called
> by the file system. So if the file system never passes a NULL
> file/kiocb it doesn't need to check for it.
Sure, but some of those helpers are non-obvious, like page_symlink().
More information about the dri-devel
mailing list