gfs2: Lock holder cleanup (fixup)
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 17 Jul 2017 18:39:15 +0000 (13:39 -0500)
committerBob Peterson <rpeterso@redhat.com>
Mon, 17 Jul 2017 18:39:15 +0000 (13:39 -0500)
Function gfs2_holder_initialized should be used in do_flock as well.

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

index c2062a1..bb48074 100644 (file)
@@ -1030,8 +1030,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
 
        mutex_lock(&fp->f_fl_mutex);
 
-       gl = fl_gh->gh_gl;
-       if (gl) {
+       if (gfs2_holder_initialized(fl_gh)) {
                if (fl_gh->gh_state == state)
                        goto out;
                locks_lock_file_wait(file,