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 c2062a108d19602544276f596de75b1f593a1e61..bb48074be01938614d1521b8589afccfe00f115c 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,