Thread (5 messages) 5 messages, 5 authors, 2023-08-28

Re: [PATCH v2] fs: clean up usage of noop_dirty_folio

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2023-08-28 14:44:09
Also in: dri-devel, linux-cxl, linux-ext4, linux-fsdevel, linux-mm, linux-xfs, lkml, nvdimm

On Mon, Aug 28, 2023 at 03:54:49PM +0800, Xueshi Hu wrote:
In folio_mark_dirty(), it can automatically fallback to
noop_dirty_folio() if a_ops->dirty_folio is not registered.

As anon_aops, dev_dax_aops and fb_deferred_io_aops becames empty, remove
them too.
I'd put the last sentence as 'In dev_dax_aops and fb_deferred_io_aops replacing
.dirty_folio with NULL makes them identical to default (empty_aops) and since
we never compare ->a_ops pointer with either of those, we can remove them
completely'.

There could've been places like
#define is_fb_deferred(mapping) (mapping)->a_ops == fb_deferred_io_aops
and those would've been broken by that.  The fact that there's nothing
of that sort in the tree ought to be mentioned in commit message.

Note that we *do* have places where method table comparisons are used
in predicates like that, so it's not a pure theory; sure, missing that
would've probably ended up with broken build, but that can easily be
dependent upon the config (and that, alas, is also not a pure theory -
BTDT).  In this case the change is correct, fortunately...

Other than that part of commit message -

Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help