@@ -265,7 +265,7 @@ int __ext4_handle_dirty_super(const char *where, unsigned int line,
265265 __ext4_handle_dirty_super(__func__, __LINE__, (handle), (sb))
266266
267267handle_t * __ext4_journal_start_sb (struct super_block * sb , unsigned int line ,
268- int type , int nblocks );
268+ int type , int blocks , int rsv_blocks );
269269int __ext4_journal_stop (const char * where , unsigned int line , handle_t * handle );
270270
271271#define EXT4_NOJOURNAL_MAX_REF_COUNT ((unsigned long) 4096)
@@ -300,21 +300,37 @@ static inline int ext4_handle_has_enough_credits(handle_t *handle, int needed)
300300}
301301
302302#define ext4_journal_start_sb (sb , type , nblocks ) \
303- __ext4_journal_start_sb((sb), __LINE__, (type), (nblocks))
303+ __ext4_journal_start_sb((sb), __LINE__, (type), (nblocks), 0 )
304304
305305#define ext4_journal_start (inode , type , nblocks ) \
306- __ext4_journal_start((inode), __LINE__, (type), (nblocks))
306+ __ext4_journal_start((inode), __LINE__, (type), (nblocks), 0)
307+
308+ #define ext4_journal_start_with_reserve (inode , type , blocks , rsv_blocks ) \
309+ __ext4_journal_start((inode), __LINE__, (type), (blocks), (rsv_blocks))
307310
308311static inline handle_t * __ext4_journal_start (struct inode * inode ,
309312 unsigned int line , int type ,
310- int nblocks )
313+ int blocks , int rsv_blocks )
311314{
312- return __ext4_journal_start_sb (inode -> i_sb , line , type , nblocks );
315+ return __ext4_journal_start_sb (inode -> i_sb , line , type , blocks ,
316+ rsv_blocks );
313317}
314318
315319#define ext4_journal_stop (handle ) \
316320 __ext4_journal_stop(__func__, __LINE__, (handle))
317321
322+ #define ext4_journal_start_reserve (handle , type ) \
323+ __ext4_journal_start_reserved((handle), __LINE__, (type))
324+
325+ handle_t * __ext4_journal_start_reserved (handle_t * handle , unsigned int line ,
326+ int type );
327+
328+ static inline void ext4_journal_free_reserved (handle_t * handle )
329+ {
330+ if (ext4_handle_valid (handle ))
331+ jbd2_journal_free_reserved (handle );
332+ }
333+
318334static inline handle_t * ext4_journal_current_handle (void )
319335{
320336 return journal_current_handle ();
0 commit comments