mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
Fix btrfs_del_ordered_inode to allow forcing the drop during unlinks
This allows us to delete an unlinked inode with dirty pages from the list instead of forcing commit to write these out before deleting the inode. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
051e1b9f74
commit
594a24eb0e
5 changed files with 19 additions and 13 deletions
|
@ -254,7 +254,7 @@ static void __btrfs_del_ordered_inode(struct btrfs_ordered_inode_tree *tree,
|
|||
return;
|
||||
}
|
||||
|
||||
void btrfs_del_ordered_inode(struct inode *inode)
|
||||
void btrfs_del_ordered_inode(struct inode *inode, int force)
|
||||
{
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
u64 root_objectid = root->root_key.objectid;
|
||||
|
@ -263,8 +263,8 @@ void btrfs_del_ordered_inode(struct inode *inode)
|
|||
return;
|
||||
}
|
||||
|
||||
if (mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY) ||
|
||||
mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK))
|
||||
if (!force && (mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY) ||
|
||||
mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK)))
|
||||
return;
|
||||
|
||||
spin_lock(&root->fs_info->new_trans_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue