On Tue 08-03-22 08:33:16, Harshad Shirwadkar wrote: > From: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> > > If the inode that's being requested to track using ext4_fc_track_inode > is being committed, then wait until the inode finishes the commit. > > Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> One comment below... > --- a/fs/ext4/ext4_jbd2.c > +++ b/fs/ext4/ext4_jbd2.c > @@ -106,6 +106,18 @@ handle_t *__ext4_journal_start_sb(struct super_block *sb, unsigned int line, > GFP_NOFS, type, line); > } > > +handle_t *__ext4_journal_start(struct inode *inode, unsigned int line, > + int type, int blocks, int rsv_blocks, > + int revoke_creds) > +{ > + handle_t *handle = __ext4_journal_start_sb(inode->i_sb, line, > + type, blocks, rsv_blocks, > + revoke_creds); > + if (ext4_handle_valid(handle) && !IS_ERR(handle)) > + ext4_fc_track_inode(handle, inode); > + return handle; > +} > + Please fix fs/ext4/inline.c rather than papering over the problem like this. Because it is just a landmine waiting to explode in some strange cornercase when someone does not call ext4_journal_start() but other handle starting function. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR