Skip to content

Commit

Permalink
ext4: remove useless ext4_pin_inode()
Browse files Browse the repository at this point in the history
This function is never used from the beginning (and is commented out);
let's remove it.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Jason Yan authored and Theodore Ts'o committed Mar 15, 2019
1 parent 1dc1097 commit 7cf7714
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6082,36 +6082,6 @@ void ext4_dirty_inode(struct inode *inode, int flags)
return;
}

#if 0
/*
* Bind an inode's backing buffer_head into this transaction, to prevent
* it from being flushed to disk early. Unlike
* ext4_reserve_inode_write, this leaves behind no bh reference and
* returns no iloc structure, so the caller needs to repeat the iloc
* lookup to mark the inode dirty later.
*/
static int ext4_pin_inode(handle_t *handle, struct inode *inode)
{
struct ext4_iloc iloc;

int err = 0;
if (handle) {
err = ext4_get_inode_loc(inode, &iloc);
if (!err) {
BUFFER_TRACE(iloc.bh, "get_write_access");
err = jbd2_journal_get_write_access(handle, iloc.bh);
if (!err)
err = ext4_handle_dirty_metadata(handle,
NULL,
iloc.bh);
brelse(iloc.bh);
}
}
ext4_std_error(inode->i_sb, err);
return err;
}
#endif

int ext4_change_inode_journal_flag(struct inode *inode, int val)
{
journal_t *journal;
Expand Down

0 comments on commit 7cf7714

Please sign in to comment.