]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix problems regarding gfs2_qa_get and _put
authorBob Peterson <rpeterso@redhat.com>
Mon, 4 May 2020 15:18:43 +0000 (10:18 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 May 2020 16:45:11 +0000 (18:45 +0200)
commit9c2863d34aa67be6a6ab0b739cb0d82c5406a214
tree551bfdeaee8b976bb2398cab1b8de18dbf422beb
parentb28f488e2b15fc428674d88009a1758b97519f22
gfs2: Fix problems regarding gfs2_qa_get and _put

This patch fixes a couple of places in which gfs2_qa_get and gfs2_qa_put are
not balanced: we now keep references around whenever a file is open for writing
(see gfs2_open_common and gfs2_release), so we need to put all references we
grab in function gfs2_create_inode.  This was broken in the successful case and
on one error path.

This also means that we don't have a reference to put in gfs2_evict_inode.

In addition, gfs2_qa_put was called for the wrong inode in gfs2_link.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/inode.c
fs/gfs2/super.c