gfs2: don't create empty buffers for NO_CREATE
authorBob Peterson <rpeterso@redhat.com>
Thu, 25 Mar 2021 12:57:00 +0000 (08:57 -0400)
committerAndreas Gruenbacher <agruenba@redhat.com>
Sat, 3 Apr 2021 19:32:09 +0000 (21:32 +0200)
commite7dfab8287bf5c5db3aec0f98e1d06d97ca1b7c7
treecfb2b40951f0193e09fea0ef4077be32c7753a93
parent8e29be3468d4565dd95fbb098df0d7a79ee60d71
gfs2: don't create empty buffers for NO_CREATE

Before this patch, function gfs2_getbuf would create empty buffers when
it was given the NO_CREATE directive from gfs2_journal_wipe. This is a
waste of time: the buffer_head is only used by gfs2_remove_from_journal
to determine if the buffer is pinned (which it won't be if it's newly
created) and if there's an associated bd element (same story).
This patch removes the useless buffer assignment.

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