Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 957a7acd authored by Abhi Das's avatar Abhi Das Committed by Bob Peterson
Browse files

gfs2: Remove inode from ordered write list in gfs2_write_inode()



The vfs clears the I_DIRTY inode flag before calling gfs2_write_inode()
having queued any data that needed to be written to disk.
This is a good time to remove such inodes from our ordered write list
so they don't hang around for long periods of time.

Signed-off-by: default avatarAbhi Das <adas@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
parent 2eb5909d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -768,6 +768,12 @@ static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc)
		ret = filemap_fdatawait(metamapping);
	if (ret)
		mark_inode_dirty_sync(inode);
	else {
		spin_lock(&inode->i_lock);
		if (!(inode->i_flags & I_DIRTY))
			gfs2_ordered_del_inode(ip);
		spin_unlock(&inode->i_lock);
	}
	return ret;
}