From: Bob Peterson Date: Sun, 3 Sep 2017 21:50:50 -0500 Subject: [Cluster-devel] [PATCH 02/29] gfs2: Lock holder cleanup (fixup) In-Reply-To: <20170904025117.14737-1-rpeterso@redhat.com> References: <20170904025117.14737-1-rpeterso@redhat.com> Message-ID: <20170904025117.14737-3-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Andreas Gruenbacher Function gfs2_holder_initialized should be used in do_flock as well. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson --- fs/gfs2/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index c2062a108d19..bb48074be019 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -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, -- 2.13.5