]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Initialize gh_error in gfs2_glock_nq
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 14 Jan 2022 08:05:13 +0000 (09:05 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 15 Feb 2022 14:01:40 +0000 (15:01 +0100)
commitcd8b4613ca473c907c296c0179890e6c7d0ef8b3
treead4979d4bcc381fa2c36082900350d6618570a8a
parenta301441d219b35e7e4b1314f5d08400db640bbae
gfs2: Initialize gh_error in gfs2_glock_nq

The gh_error field if a glock holder is initialized to zero in
gfs2_holder_init().  When a locking operation fails, gh_error is set to
an error code; when it succeeds, the gh_error value is left unchanged.
The field isn't initialized in gfs2_holder_reinit(), which is a problem.
Instead of fixing that directly, initialize gh_error in gfs2_glock_nq().
That also obsoletes the assignment in do_flock().

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