Skip to content

Commit 9ab5127

Browse files
committed
Merge: gfs2: invalid metadata block in gfs2_meta_buffer
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6772 JIRA: https://issues.redhat.com/browse/RHEL-88093 Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Approved-by: Andrew Price <anprice@redhat.com> Approved-by: Abhi Das <adas@redhat.com> Approved-by: Paul Evans <pevans@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents b7c939c + 9d87ea1 commit 9ab5127

File tree

21 files changed

+391
-376
lines changed

21 files changed

+391
-376
lines changed

fs/gfs2/acl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
#define GFS2_ACL_MAX_ENTRIES(sdp) ((300 << (sdp)->sd_sb.sb_bsize_shift) >> 12)
1313

14-
extern struct posix_acl *gfs2_get_acl(struct inode *inode, int type, bool rcu);
15-
extern int __gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type);
16-
extern int gfs2_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
17-
struct posix_acl *acl, int type);
14+
struct posix_acl *gfs2_get_acl(struct inode *inode, int type, bool rcu);
15+
int __gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type);
16+
int gfs2_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
17+
struct posix_acl *acl, int type);
1818

1919
#endif /* __ACL_DOT_H__ */

fs/gfs2/aops.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include "incore.h"
1010

11-
extern void adjust_fs_space(struct inode *inode);
12-
extern void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page,
13-
unsigned int from, unsigned int len);
11+
void adjust_fs_space(struct inode *inode);
12+
void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page,
13+
unsigned int from, unsigned int len);
1414

1515
#endif /* __AOPS_DOT_H__ */

fs/gfs2/bmap.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ static inline void gfs2_write_calc_reserv(const struct gfs2_inode *ip,
4646
extern const struct iomap_ops gfs2_iomap_ops;
4747
extern const struct iomap_writeback_ops gfs2_writeback_ops;
4848

49-
extern int gfs2_unstuff_dinode(struct gfs2_inode *ip);
50-
extern int gfs2_block_map(struct inode *inode, sector_t lblock,
51-
struct buffer_head *bh, int create);
52-
extern int gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length,
53-
struct iomap *iomap);
54-
extern int gfs2_iomap_alloc(struct inode *inode, loff_t pos, loff_t length,
55-
struct iomap *iomap);
56-
extern int gfs2_get_extent(struct inode *inode, u64 lblock, u64 *dblock,
57-
unsigned int *extlen);
58-
extern int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock,
59-
unsigned *extlen, bool *new);
60-
extern int gfs2_setattr_size(struct inode *inode, u64 size);
61-
extern void gfs2_trim_blocks(struct inode *inode);
62-
extern int gfs2_truncatei_resume(struct gfs2_inode *ip);
63-
extern int gfs2_file_dealloc(struct gfs2_inode *ip);
64-
extern int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
65-
unsigned int len);
66-
extern int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd);
67-
extern void gfs2_free_journal_extents(struct gfs2_jdesc *jd);
68-
extern int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length);
49+
int gfs2_unstuff_dinode(struct gfs2_inode *ip);
50+
int gfs2_block_map(struct inode *inode, sector_t lblock,
51+
struct buffer_head *bh, int create);
52+
int gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length,
53+
struct iomap *iomap);
54+
int gfs2_iomap_alloc(struct inode *inode, loff_t pos, loff_t length,
55+
struct iomap *iomap);
56+
int gfs2_get_extent(struct inode *inode, u64 lblock, u64 *dblock,
57+
unsigned int *extlen);
58+
int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock,
59+
unsigned *extlen, bool *new);
60+
int gfs2_setattr_size(struct inode *inode, u64 size);
61+
void gfs2_trim_blocks(struct inode *inode);
62+
int gfs2_truncatei_resume(struct gfs2_inode *ip);
63+
int gfs2_file_dealloc(struct gfs2_inode *ip);
64+
int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
65+
unsigned int len);
66+
int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd);
67+
void gfs2_free_journal_extents(struct gfs2_jdesc *jd);
68+
int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length);
6969

7070
#endif /* __BMAP_DOT_H__ */

fs/gfs2/dir.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@ struct gfs2_diradd {
2323
int save_loc;
2424
};
2525

26-
extern struct inode *gfs2_dir_search(struct inode *dir,
27-
const struct qstr *filename,
28-
bool fail_on_exist);
29-
extern int gfs2_dir_check(struct inode *dir, const struct qstr *filename,
30-
const struct gfs2_inode *ip);
31-
extern int gfs2_dir_add(struct inode *inode, const struct qstr *filename,
32-
const struct gfs2_inode *ip, struct gfs2_diradd *da);
26+
struct inode *gfs2_dir_search(struct inode *dir,
27+
const struct qstr *filename,
28+
bool fail_on_exist);
29+
int gfs2_dir_check(struct inode *dir, const struct qstr *filename,
30+
const struct gfs2_inode *ip);
31+
int gfs2_dir_add(struct inode *inode, const struct qstr *filename,
32+
const struct gfs2_inode *ip, struct gfs2_diradd *da);
3333
static inline void gfs2_dir_no_add(struct gfs2_diradd *da)
3434
{
3535
brelse(da->bh);
3636
da->bh = NULL;
3737
}
38-
extern int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry);
39-
extern int gfs2_dir_read(struct inode *inode, struct dir_context *ctx,
40-
struct file_ra_state *f_ra);
41-
extern int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
42-
const struct gfs2_inode *nip, unsigned int new_type);
38+
int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry);
39+
int gfs2_dir_read(struct inode *inode, struct dir_context *ctx,
40+
struct file_ra_state *f_ra);
41+
int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
42+
const struct gfs2_inode *nip, unsigned int new_type);
4343

44-
extern int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip);
44+
int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip);
4545

46-
extern int gfs2_diradd_alloc_required(struct inode *dir,
47-
const struct qstr *filename,
48-
struct gfs2_diradd *da);
49-
extern int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
50-
struct buffer_head **bhp);
51-
extern void gfs2_dir_hash_inval(struct gfs2_inode *ip);
46+
int gfs2_diradd_alloc_required(struct inode *dir,
47+
const struct qstr *filename,
48+
struct gfs2_diradd *da);
49+
int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
50+
struct buffer_head **bhp);
51+
void gfs2_dir_hash_inval(struct gfs2_inode *ip);
5252

5353
static inline u32 gfs2_disk_hash(const char *data, int len)
5454
{

fs/gfs2/glock.h

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -182,40 +182,40 @@ static inline struct address_space *gfs2_glock2aspace(struct gfs2_glock *gl)
182182
return NULL;
183183
}
184184

185-
extern int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
186-
const struct gfs2_glock_operations *glops,
187-
int create, struct gfs2_glock **glp);
188-
extern struct gfs2_glock *gfs2_glock_hold(struct gfs2_glock *gl);
189-
extern void gfs2_glock_put(struct gfs2_glock *gl);
190-
extern void gfs2_glock_put_async(struct gfs2_glock *gl);
191-
192-
extern void __gfs2_holder_init(struct gfs2_glock *gl, unsigned int state,
193-
u16 flags, struct gfs2_holder *gh,
194-
unsigned long ip);
185+
int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
186+
const struct gfs2_glock_operations *glops,
187+
int create, struct gfs2_glock **glp);
188+
struct gfs2_glock *gfs2_glock_hold(struct gfs2_glock *gl);
189+
void gfs2_glock_put(struct gfs2_glock *gl);
190+
void gfs2_glock_put_async(struct gfs2_glock *gl);
191+
192+
void __gfs2_holder_init(struct gfs2_glock *gl, unsigned int state,
193+
u16 flags, struct gfs2_holder *gh,
194+
unsigned long ip);
195195
static inline void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state,
196196
u16 flags, struct gfs2_holder *gh) {
197197
__gfs2_holder_init(gl, state, flags, gh, _RET_IP_);
198198
}
199199

200-
extern void gfs2_holder_reinit(unsigned int state, u16 flags,
201-
struct gfs2_holder *gh);
202-
extern void gfs2_holder_uninit(struct gfs2_holder *gh);
203-
extern int gfs2_glock_nq(struct gfs2_holder *gh);
204-
extern int gfs2_glock_poll(struct gfs2_holder *gh);
205-
extern int gfs2_instantiate(struct gfs2_holder *gh);
206-
extern int gfs2_glock_holder_ready(struct gfs2_holder *gh);
207-
extern int gfs2_glock_wait(struct gfs2_holder *gh);
208-
extern int gfs2_glock_async_wait(unsigned int num_gh, struct gfs2_holder *ghs);
209-
extern void gfs2_glock_dq(struct gfs2_holder *gh);
210-
extern void gfs2_glock_dq_wait(struct gfs2_holder *gh);
211-
extern void gfs2_glock_dq_uninit(struct gfs2_holder *gh);
212-
extern int gfs2_glock_nq_num(struct gfs2_sbd *sdp, u64 number,
213-
const struct gfs2_glock_operations *glops,
214-
unsigned int state, u16 flags,
215-
struct gfs2_holder *gh);
216-
extern int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs);
217-
extern void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);
218-
extern void gfs2_dump_glock(struct seq_file *seq, struct gfs2_glock *gl,
200+
void gfs2_holder_reinit(unsigned int state, u16 flags,
201+
struct gfs2_holder *gh);
202+
void gfs2_holder_uninit(struct gfs2_holder *gh);
203+
int gfs2_glock_nq(struct gfs2_holder *gh);
204+
int gfs2_glock_poll(struct gfs2_holder *gh);
205+
int gfs2_instantiate(struct gfs2_holder *gh);
206+
int gfs2_glock_holder_ready(struct gfs2_holder *gh);
207+
int gfs2_glock_wait(struct gfs2_holder *gh);
208+
int gfs2_glock_async_wait(unsigned int num_gh, struct gfs2_holder *ghs);
209+
void gfs2_glock_dq(struct gfs2_holder *gh);
210+
void gfs2_glock_dq_wait(struct gfs2_holder *gh);
211+
void gfs2_glock_dq_uninit(struct gfs2_holder *gh);
212+
int gfs2_glock_nq_num(struct gfs2_sbd *sdp, u64 number,
213+
const struct gfs2_glock_operations *glops,
214+
unsigned int state, u16 flags,
215+
struct gfs2_holder *gh);
216+
int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs);
217+
void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);
218+
void gfs2_dump_glock(struct seq_file *seq, struct gfs2_glock *gl,
219219
bool fsid);
220220
#define GLOCK_BUG_ON(gl,x) do { if (unlikely(x)) { \
221221
gfs2_dump_glock(NULL, gl, true); \
@@ -229,7 +229,7 @@ extern void gfs2_dump_glock(struct seq_file *seq, struct gfs2_glock *gl,
229229
gfs2_assert_withdraw((gl)->gl_name.ln_sbd, (x)); } } \
230230
while (0)
231231

232-
extern __printf(2, 3)
232+
__printf(2, 3)
233233
void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...);
234234

235235
/**
@@ -257,28 +257,28 @@ static inline int gfs2_glock_nq_init(struct gfs2_glock *gl,
257257
return error;
258258
}
259259

260-
extern void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state);
261-
extern void gfs2_glock_complete(struct gfs2_glock *gl, int ret);
262-
extern bool gfs2_queue_try_to_evict(struct gfs2_glock *gl);
263-
extern bool gfs2_queue_verify_delete(struct gfs2_glock *gl, bool later);
264-
extern void gfs2_cancel_delete_work(struct gfs2_glock *gl);
265-
extern void gfs2_flush_delete_work(struct gfs2_sbd *sdp);
266-
extern void gfs2_gl_hash_clear(struct gfs2_sbd *sdp);
267-
extern void gfs2_gl_dq_holders(struct gfs2_sbd *sdp);
268-
extern void gfs2_glock_thaw(struct gfs2_sbd *sdp);
269-
extern void gfs2_glock_free(struct gfs2_glock *gl);
270-
extern void gfs2_glock_free_later(struct gfs2_glock *gl);
271-
272-
extern int __init gfs2_glock_init(void);
273-
extern void gfs2_glock_exit(void);
274-
275-
extern void gfs2_create_debugfs_file(struct gfs2_sbd *sdp);
276-
extern void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp);
277-
extern void gfs2_register_debugfs(void);
278-
extern void gfs2_unregister_debugfs(void);
279-
280-
extern void glock_set_object(struct gfs2_glock *gl, void *object);
281-
extern void glock_clear_object(struct gfs2_glock *gl, void *object);
260+
void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state);
261+
void gfs2_glock_complete(struct gfs2_glock *gl, int ret);
262+
bool gfs2_queue_try_to_evict(struct gfs2_glock *gl);
263+
bool gfs2_queue_verify_delete(struct gfs2_glock *gl, bool later);
264+
void gfs2_cancel_delete_work(struct gfs2_glock *gl);
265+
void gfs2_flush_delete_work(struct gfs2_sbd *sdp);
266+
void gfs2_gl_hash_clear(struct gfs2_sbd *sdp);
267+
void gfs2_gl_dq_holders(struct gfs2_sbd *sdp);
268+
void gfs2_glock_thaw(struct gfs2_sbd *sdp);
269+
void gfs2_glock_free(struct gfs2_glock *gl);
270+
void gfs2_glock_free_later(struct gfs2_glock *gl);
271+
272+
int __init gfs2_glock_init(void);
273+
void gfs2_glock_exit(void);
274+
275+
void gfs2_create_debugfs_file(struct gfs2_sbd *sdp);
276+
void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp);
277+
void gfs2_register_debugfs(void);
278+
void gfs2_unregister_debugfs(void);
279+
280+
void glock_set_object(struct gfs2_glock *gl, void *object);
281+
void glock_clear_object(struct gfs2_glock *gl, void *object);
282282

283283
extern const struct lm_lockops gfs2_dlm_ops;
284284

@@ -297,8 +297,8 @@ static inline bool gfs2_holder_queued(struct gfs2_holder *gh)
297297
return !list_empty(&gh->gh_list);
298298
}
299299

300-
extern void gfs2_inode_remember_delete(struct gfs2_glock *gl, u64 generation);
301-
extern bool gfs2_inode_already_deleted(struct gfs2_glock *gl, u64 generation);
300+
void gfs2_inode_remember_delete(struct gfs2_glock *gl, u64 generation);
301+
bool gfs2_inode_already_deleted(struct gfs2_glock *gl, u64 generation);
302302

303303
static inline bool glock_needs_demote(struct gfs2_glock *gl)
304304
{

fs/gfs2/glops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern const struct gfs2_glock_operations gfs2_quota_glops;
2222
extern const struct gfs2_glock_operations gfs2_journal_glops;
2323
extern const struct gfs2_glock_operations *gfs2_glops_list[];
2424

25-
extern int gfs2_inode_metasync(struct gfs2_glock *gl);
26-
extern void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync);
25+
int gfs2_inode_metasync(struct gfs2_glock *gl);
26+
void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync);
2727

2828
#endif /* __GLOPS_DOT_H__ */

fs/gfs2/incore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ static inline void gfs2_sbstats_inc(const struct gfs2_glock *gl, int which)
864864
preempt_enable();
865865
}
866866

867-
extern struct gfs2_rgrpd *gfs2_glock2rgrp(struct gfs2_glock *gl);
867+
struct gfs2_rgrpd *gfs2_glock2rgrp(struct gfs2_glock *gl);
868868

869869
static inline unsigned gfs2_max_stuffed_size(const struct gfs2_inode *ip)
870870
{

0 commit comments

Comments
 (0)