[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251006-exhumieren-staub-bbd9b043162d@brauner>
Date: Mon, 6 Oct 2025 12:30:44 +0200
From: Christian Brauner <brauner@...nel.org>
To: Julian Sun <sunjunchao@...edance.com>
Cc: Christian Brauner <brauner@...nel.org>,
clm@...com,
dsterba@...e.com,
xiubli@...hat.com,
idryomov@...il.com,
tytso@....edu,
adilger.kernel@...ger.ca,
jaegeuk@...nel.org,
chao@...nel.org,
willy@...radead.org,
jack@...e.cz,
agruenba@...hat.com,
linux-fsdevel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-ext4@...r.kernel.org,
ceph-devel@...r.kernel.org,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH v2] fs: Make wbc_to_tag() inline and use it in fs.
On Mon, 29 Sep 2025 19:13:49 +0800, Julian Sun wrote:
> The logic in wbc_to_tag() is widely used in file systems, so modify this
> function to be inline and use it in file systems.
>
> This patch has only passed compilation tests, but it should be fine.
>
>
Folding:
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index dde77d13a200..1e60d463f226 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -196,6 +196,13 @@ static inline void wait_on_inode(struct inode *inode)
!(READ_ONCE(inode->i_state) & I_NEW));
}
+static inline xa_mark_t wbc_to_tag(struct writeback_control *wbc)
+{
+ if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
+ return PAGECACHE_TAG_TOWRITE;
+ return PAGECACHE_TAG_DIRTY;
+}
+
#ifdef CONFIG_CGROUP_WRITEBACK
#include <linux/cgroup.h>
@@ -240,13 +247,6 @@ static inline void inode_detach_wb(struct inode *inode)
}
}
-static inline xa_mark_t wbc_to_tag(struct writeback_control *wbc)
-{
- if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
- return PAGECACHE_TAG_TOWRITE;
- return PAGECACHE_TAG_DIRTY;
-}
-
void wbc_attach_fdatawrite_inode(struct writeback_control *wbc,
struct inode *inode);
since wbc_to_tag() cannot be conditional on cgroup writeback.
---
Applied to the vfs-6.19.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.19.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.19.misc
[1/1] fs: Make wbc_to_tag() inline and use it in fs.
https://git.kernel.org/vfs/vfs/c/48b6926673f7
Powered by blists - more mailing lists