gfs2: eliminate GIF_ORDERED in favor of list_empty
authorBob Peterson <rpeterso@redhat.com>
Wed, 17 Jun 2020 12:47:34 +0000 (07:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:01 +0000 (09:34 +0200)
commit028bd010bb4b08d17b5e0d0759c6333893d4a218
treee22b2fd05270140bfb069f1b5da11e16e824ba75
parentf4d6ffaeb30836ac90e7686de2e8ec80e9316450
gfs2: eliminate GIF_ORDERED in favor of list_empty

[ Upstream commit 7542486b89b2e321ffe0de82163b425d6a38bc72 ]

In several places, we used the GIF_ORDERED inode flag to determine
if an inode was on the ordered writes list. However, since we always
held the sd_ordered_lock spin_lock during the manipulation, we can
just as easily check list_empty(&ip->i_ordered) instead.
This allows us to keep more than one ordered writes list to make
journal writing improvements.

This patch eliminates GIF_ORDERED in favor of checking list_empty.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/gfs2/incore.h
fs/gfs2/log.c
fs/gfs2/log.h
fs/gfs2/main.c