Various minor gfs2 cleanups and fixes

-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEJZs3krPW0xkhLMTc1b+f6wMTZToFAmHdubYUHGFncnVlbmJh
 QHJlZGhhdC5jb20ACgkQ1b+f6wMTZTpngxAAg+N74AZhPeUoPsvbVf4LKJ8eJRTY
 4329sUjORwpy2g2wN1I53vOnpSjFQ0uWxaOwsuBTmTzM2lr9+J3w/a7Chx5q6M7D
 o8dHh4BAwKGmXoCqMxvSiBtFiD/cht7YjjGGb+Q6+qa8viLky3Oksps9SsaZqMCf
 RD+33fflp3eppPZTVgo9n+zuxbMz4wT9GpS/GNZy8GhKhPM+v5cPCw1pV0Wy1b7T
 2FXsKBtk+odTzbfj88gQ+b2hoRMMQ2FLqIsqyJKajMuBwiBpuPzrm03J2B9N1OJ0
 R0Ir0mXV627SoQ4N7v12MfmSF3+XMUTEMrdxMGbjsOz35TtspfOc5+mmveVF4DBD
 T4zsK9ju6N/4OtsetOB3MF1AV5Hj0zOvuFZ1y71Bk9RBAJvLrzbHc17KtMEYbVgQ
 XUQYY6IGYiVBr8n8x9t3LaPhOzYXwvgFwAmetZE8vYkLZQEQlgRVYJymFR8iluLo
 oIPy1ciZgyMRDCa1/OHAIV604qwTChRLzO6WnDhdwWPwF/Sx4cHnhNVyR/5cp1ub
 GG6E4o/jopeblftQHO5j+GIZAAwo8abU4ahJXUJaPQVdyY3VjOPhd+ooTrNbEEug
 qijL1fIojcalDyCG2cIsXlFtXSb9Txr3L1fxOkluwmwVdR9LHJSEeDxYvIN20L/+
 yqnHctyg9+HNsIc=
 =icLi
 -----END PGP SIGNATURE-----

Merge tag 'gfs2-v5.16-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 updates from Andreas Gruenbacher:
 "Various minor gfs2 cleanups and fixes"

* tag 'gfs2-v5.16-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: dump inode object for iopen glocks
  gfs2: Fix gfs2_instantiate description
  gfs2: Remove redundant check for GLF_INSTANTIATE_NEEDED
  gfs2: remove redundant set of INSTANTIATE_NEEDED
  gfs2: Fix __gfs2_holder_init function name in kernel-doc comment
This commit is contained in:
Linus Torvalds 2022-01-11 15:20:32 -08:00
commit 8481c323e4
3 changed files with 6 additions and 8 deletions

View File

@ -477,7 +477,7 @@ find_first_strong_holder(struct gfs2_glock *gl)
/* /*
* gfs2_instantiate - Call the glops instantiate function * gfs2_instantiate - Call the glops instantiate function
* @gl: The glock * @gh: The glock holder
* *
* Returns: 0 if instantiate was successful, 2 if type specific operation is * Returns: 0 if instantiate was successful, 2 if type specific operation is
* underway, or error. * underway, or error.
@ -1245,7 +1245,7 @@ out:
} }
/** /**
* gfs2_holder_init - initialize a struct gfs2_holder in the default way * __gfs2_holder_init - initialize a struct gfs2_holder in the default way
* @gl: the glock * @gl: the glock
* @state: the state we're requesting * @state: the state we're requesting
* @flags: the modifier flags * @flags: the modifier flags

View File

@ -228,7 +228,6 @@ static void rgrp_go_inval(struct gfs2_glock *gl, int flags)
gfs2_rgrp_brelse(rgd); gfs2_rgrp_brelse(rgd);
WARN_ON_ONCE(!(flags & DIO_METADATA)); WARN_ON_ONCE(!(flags & DIO_METADATA));
truncate_inode_pages_range(mapping, start, end); truncate_inode_pages_range(mapping, start, end);
set_bit(GLF_INSTANTIATE_NEEDED, &gl->gl_flags);
} }
static void gfs2_rgrp_go_dump(struct seq_file *seq, struct gfs2_glock *gl, static void gfs2_rgrp_go_dump(struct seq_file *seq, struct gfs2_glock *gl,
@ -764,6 +763,7 @@ const struct gfs2_glock_operations gfs2_freeze_glops = {
const struct gfs2_glock_operations gfs2_iopen_glops = { const struct gfs2_glock_operations gfs2_iopen_glops = {
.go_type = LM_TYPE_IOPEN, .go_type = LM_TYPE_IOPEN,
.go_callback = iopen_go_callback, .go_callback = iopen_go_callback,
.go_dump = inode_go_dump,
.go_demote_ok = iopen_go_demote_ok, .go_demote_ok = iopen_go_demote_ok,
.go_flags = GLOF_LRU | GLOF_NONDISK, .go_flags = GLOF_LRU | GLOF_NONDISK,
.go_subclass = 1, .go_subclass = 1,

View File

@ -1244,11 +1244,9 @@ static enum dinode_demise evict_should_delete(struct inode *inode,
if (ret) if (ret)
return SHOULD_NOT_DELETE_DINODE; return SHOULD_NOT_DELETE_DINODE;
if (test_bit(GLF_INSTANTIATE_NEEDED, &ip->i_gl->gl_flags)) { ret = gfs2_instantiate(gh);
ret = gfs2_instantiate(gh); if (ret)
if (ret) return SHOULD_NOT_DELETE_DINODE;
return SHOULD_NOT_DELETE_DINODE;
}
/* /*
* The inode may have been recreated in the meantime. * The inode may have been recreated in the meantime.