From cb0d9d47a39decbdfaeaa5c063467ed21b2c70b3 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 22 Feb 2016 23:20:30 -0500 Subject: jbd2: save some atomic ops in __JI_COMMIT_RUNNING handling Currently we used atomic bit operations to manipulate __JI_COMMIT_RUNNING bit. However this is unnecessary as i_flags are always written and read under j_list_lock. So just change the operations to standard bit operations. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/jbd2/journal.c') diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index defa962a8e15..7bf1683e81af 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2587,7 +2587,7 @@ void jbd2_journal_release_jbd_inode(journal_t *journal, restart: spin_lock(&journal->j_list_lock); /* Is commit writing out inode - we have to wait */ - if (test_bit(__JI_COMMIT_RUNNING, &jinode->i_flags)) { + if (jinode->i_flags & JI_COMMIT_RUNNING) { wait_queue_head_t *wq; DEFINE_WAIT_BIT(wait, &jinode->i_flags, __JI_COMMIT_RUNNING); wq = bit_waitqueue(&jinode->i_flags, __JI_COMMIT_RUNNING); -- cgit v1.2.3