Skip to content

Commit 7cf7714

Browse files
JasonYanHwtytso
authored andcommitted
ext4: remove useless ext4_pin_inode()
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>
1 parent 1dc1097 commit 7cf7714

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

fs/ext4/inode.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6082,36 +6082,6 @@ void ext4_dirty_inode(struct inode *inode, int flags)
60826082
return;
60836083
}
60846084

6085-
#if 0
6086-
/*
6087-
* Bind an inode's backing buffer_head into this transaction, to prevent
6088-
* it from being flushed to disk early. Unlike
6089-
* ext4_reserve_inode_write, this leaves behind no bh reference and
6090-
* returns no iloc structure, so the caller needs to repeat the iloc
6091-
* lookup to mark the inode dirty later.
6092-
*/
6093-
static int ext4_pin_inode(handle_t *handle, struct inode *inode)
6094-
{
6095-
struct ext4_iloc iloc;
6096-
6097-
int err = 0;
6098-
if (handle) {
6099-
err = ext4_get_inode_loc(inode, &iloc);
6100-
if (!err) {
6101-
BUFFER_TRACE(iloc.bh, "get_write_access");
6102-
err = jbd2_journal_get_write_access(handle, iloc.bh);
6103-
if (!err)
6104-
err = ext4_handle_dirty_metadata(handle,
6105-
NULL,
6106-
iloc.bh);
6107-
brelse(iloc.bh);
6108-
}
6109-
}
6110-
ext4_std_error(inode->i_sb, err);
6111-
return err;
6112-
}
6113-
#endif
6114-
61156085
int ext4_change_inode_journal_flag(struct inode *inode, int val)
61166086
{
61176087
journal_t *journal;

0 commit comments

Comments
 (0)