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 <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user