diff options
| author | Julian Sun <sunjunchao@bytedance.com> | 2025-09-29 19:13:49 +0800 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-10-29 23:33:48 +0100 |
| commit | 4952f35f0545f3b53dab8d5fd727c4827c2a2778 (patch) | |
| tree | 0cc0563c7281223a21f18ebedf01adff666d775d /fs/ext4 | |
| parent | 891bea757c771dca47e871444faecb1ed642a311 (diff) | |
| download | linux-next-4952f35f0545f3b53dab8d5fd727c4827c2a2778.tar.gz linux-next-4952f35f0545f3b53dab8d5fd727c4827c2a2778.zip | |
fs: Make wbc_to_tag() inline and use it in fs.
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.
Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f9e4ac87211e..58d6194045e2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2619,10 +2619,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd) handle_t *handle = NULL; int bpp = ext4_journal_blocks_per_folio(mpd->inode); - if (mpd->wbc->sync_mode == WB_SYNC_ALL || mpd->wbc->tagged_writepages) - tag = PAGECACHE_TAG_TOWRITE; - else - tag = PAGECACHE_TAG_DIRTY; + tag = wbc_to_tag(mpd->wbc); mpd->map.m_len = 0; mpd->next_pos = mpd->start_pos; |
