Skip to content

Commit b50924c

Browse files
dedekindtytso
authored andcommitted
ext4: remove unnecessary argument from __ext4_handle_dirty_metadata()
The '__ext4_handle_dirty_metadata()' does not need the 'now' argument anymore and we can kill it. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
1 parent 4d47603 commit b50924c

5 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎fs/ext4/ext4_jbd2.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
138138
}
139139

140140
int __ext4_handle_dirty_super(const char *where, unsigned int line,
141-
handle_t *handle, struct super_block *sb,
142-
int now)
141+
handle_t *handle, struct super_block *sb)
143142
{
144143
struct buffer_head *bh = EXT4_SB(sb)->s_sbh;
145144
int err = 0;

‎fs/ext4/ext4_jbd2.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
219219
struct buffer_head *bh);
220220

221221
int __ext4_handle_dirty_super(const char *where, unsigned int line,
222-
handle_t *handle, struct super_block *sb,
223-
int now);
222+
handle_t *handle, struct super_block *sb);
224223

225224
#define ext4_journal_get_write_access(handle, bh) \
226225
__ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh))
@@ -232,10 +231,8 @@ int __ext4_handle_dirty_super(const char *where, unsigned int line,
232231
#define ext4_handle_dirty_metadata(handle, inode, bh) \
233232
__ext4_handle_dirty_metadata(__func__, __LINE__, (handle), (inode), \
234233
(bh))
235-
#define ext4_handle_dirty_super_now(handle, sb) \
236-
__ext4_handle_dirty_super(__func__, __LINE__, (handle), (sb), 1)
237234
#define ext4_handle_dirty_super(handle, sb) \
238-
__ext4_handle_dirty_super(__func__, __LINE__, (handle), (sb), 0)
235+
__ext4_handle_dirty_super(__func__, __LINE__, (handle), (sb))
239236

240237
handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks);
241238
int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle);

‎fs/ext4/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4093,7 +4093,7 @@ static int ext4_do_update_inode(handle_t *handle,
40934093
EXT4_SET_RO_COMPAT_FEATURE(sb,
40944094
EXT4_FEATURE_RO_COMPAT_LARGE_FILE);
40954095
ext4_handle_sync(handle);
4096-
err = ext4_handle_dirty_super_now(handle, sb);
4096+
err = ext4_handle_dirty_super(handle, sb);
40974097
}
40984098
}
40994099
raw_inode->i_generation = cpu_to_le32(inode->i_generation);

‎fs/ext4/namei.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
23972397
/* Insert this inode at the head of the on-disk orphan list... */
23982398
NEXT_ORPHAN(inode) = le32_to_cpu(EXT4_SB(sb)->s_es->s_last_orphan);
23992399
EXT4_SB(sb)->s_es->s_last_orphan = cpu_to_le32(inode->i_ino);
2400-
err = ext4_handle_dirty_super_now(handle, sb);
2400+
err = ext4_handle_dirty_super(handle, sb);
24012401
rc = ext4_mark_iloc_dirty(handle, inode, &iloc);
24022402
if (!err)
24032403
err = rc;
@@ -2470,7 +2470,7 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
24702470
if (err)
24712471
goto out_brelse;
24722472
sbi->s_es->s_last_orphan = cpu_to_le32(ino_next);
2473-
err = ext4_handle_dirty_super_now(handle, inode->i_sb);
2473+
err = ext4_handle_dirty_super(handle, inode->i_sb);
24742474
} else {
24752475
struct ext4_iloc iloc2;
24762476
struct inode *i_prev =

‎fs/ext4/resize.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
798798
ext4_kvfree(o_group_desc);
799799

800800
le16_add_cpu(&es->s_reserved_gdt_blocks, -1);
801-
err = ext4_handle_dirty_super_now(handle, sb);
801+
err = ext4_handle_dirty_super(handle, sb);
802802
if (err)
803803
ext4_std_error(sb, err);
804804

0 commit comments

Comments
 (0)