2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

gfs2: Move gfs2_log_pointers_init

Move gfs2_log_pointers_init to recovery.c: there is no need for inlining
this function.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
Andreas Gruenbacher 2025-05-16 05:24:22 +02:00
parent 91793971f3
commit 703a4af356
3 changed files with 10 additions and 11 deletions

View File

@ -44,17 +44,6 @@ __releases(&sdp->sd_log_lock)
spin_unlock(&sdp->sd_log_lock); spin_unlock(&sdp->sd_log_lock);
} }
static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp,
unsigned int value)
{
if (++value == sdp->sd_jdesc->jd_blocks) {
value = 0;
}
sdp->sd_log_tail = value;
sdp->sd_log_flush_tail = value;
sdp->sd_log_head = value;
}
static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip) static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip)
{ {
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);

View File

@ -581,3 +581,12 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd, bool wait)
return wait ? jd->jd_recover_error : 0; return wait ? jd->jd_recover_error : 0;
} }
void gfs2_log_pointers_init(struct gfs2_sbd *sdp, unsigned int value)
{
if (++value == sdp->sd_jdesc->jd_blocks) {
value = 0;
}
sdp->sd_log_tail = value;
sdp->sd_log_flush_tail = value;
sdp->sd_log_head = value;
}

View File

@ -29,6 +29,7 @@ void gfs2_recover_func(struct work_struct *work);
int __get_log_header(struct gfs2_sbd *sdp, int __get_log_header(struct gfs2_sbd *sdp,
const struct gfs2_log_header *lh, unsigned int blkno, const struct gfs2_log_header *lh, unsigned int blkno,
struct gfs2_log_header_host *head); struct gfs2_log_header_host *head);
void gfs2_log_pointers_init(struct gfs2_sbd *sdp, unsigned int value);
#endif /* __RECOVERY_DOT_H__ */ #endif /* __RECOVERY_DOT_H__ */