]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Check if iopen is held when deleting inode
authorBob Peterson <rpeterso@redhat.com>
Fri, 18 Dec 2015 17:54:55 +0000 (11:54 -0600)
committerBob Peterson <rpeterso@redhat.com>
Thu, 14 Jan 2016 13:47:42 +0000 (08:47 -0500)
commit701793e6bb754fdad0c2ff287eacf78b88ed16c7
treeef25c3648ace05e47eca1ecc76ddbba541bd4f03
parent5e7a06f817ff3b2606b4e930d16bb09a4c4e4ad8
GFS2: Check if iopen is held when deleting inode

This patch fixes an error condition in which an inode is partially
created in gfs2_create_inode() but then some error is discovered,
which causes it to fail and call iput() before the iopen glock is
created or held. In that case, gfs2_delete_inode would try to
unlock an iopen glock that doesn't yet exist. Therefore, we test
its holder (which must exist) for the HIF_HOLDER bit before trying
to dq it.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glock.c
fs/gfs2/super.c