Files
linux/fs
Bob Peterson 2c47c1be51 gfs2: clean up iopen glock mess in gfs2_create_inode
Before this patch, gfs2_create_inode had a use-after-free for the
iopen glock in some error paths because it did this:

	gfs2_glock_put(io_gl);
fail_gunlock2:
	if (io_gl)
		clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);

In some cases, the io_gl was used for create and only had one
reference, so the glock might be freed before the clear_bit().
This patch tries to straighten it out by only jumping to the
error paths where iopen is properly set, and moving the
gfs2_glock_put after the clear_bit.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2019-11-19 21:02:01 +01:00
..
2019-09-29 19:25:39 -07:00
2019-07-03 17:52:09 -04:00
2019-10-19 06:32:32 -04:00
2019-08-30 08:11:25 -07:00
2019-04-08 18:21:02 -05:00
2019-08-07 21:51:47 -04:00
…
2019-10-14 15:04:01 -07:00
…
2019-08-01 20:51:23 +02:00
2019-09-25 17:51:41 -07:00