diff options
author | Bob Peterson <rpeterso@redhat.com> | 2015-12-04 20:04:34 +0100 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-12-18 18:04:46 +0100 |
commit | 6cc4b6e801c725321e9f63ca7c2d00af8df24699 (patch) | |
tree | 9753131b4c37ac330f5398a82fc46a6ac537c95e | |
parent | GFS2: Always use iopen glock for gl_deletes (diff) | |
download | linux-6cc4b6e801c725321e9f63ca7c2d00af8df24699.tar.xz linux-6cc4b6e801c725321e9f63ca7c2d00af8df24699.zip |
GFS2: Don't do glock put on when inode creation fails
Currently the error path of function gfs2_inode_lookup calls function
gfs2_glock_put corresponding to an earlier call to gfs2_glock_get for
the inode glock. That's wrong because the error path also calls
iget_failed() which eventually calls iput, which eventually calls
gfs2_evict_inode, which does another gfs2_glock_put. This double-put
can cause the glock reference count to get off.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
-rw-r--r-- | fs/gfs2/inode.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 87fa5992e12a..009b551a5d8c 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -198,7 +198,6 @@ fail_iopen: gfs2_glock_put(io_gl); fail_put: ip->i_gl->gl_object = NULL; - gfs2_glock_put(ip->i_gl); fail: iget_failed(inode); return ERR_PTR(error); |