Skip to content

Commit

Permalink
btrfs: clear __GFP_FS flag in the space cache inode
Browse files Browse the repository at this point in the history
the object id of the space cache inode's key is allocated from the relative
root, just like the regular file. So we can't identify space cache inode by
checking the object id of the inode's key, and we have to clear __GFP_FS flag
at the time we look up the space cache inode.

Signed-off-by: Miao Xie <[email protected]>
Signed-off-by: Liu Bo <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Miao Xie authored and chrismason-xx committed Apr 5, 2011
1 parent 6e8df2a commit adae52b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root,
return ERR_PTR(-ENOENT);
}

inode->i_mapping->flags &= ~__GFP_FS;

spin_lock(&block_group->lock);
if (!root->fs_info->closing) {
block_group->inode = igrab(inode);
Expand Down
2 changes: 0 additions & 2 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2535,8 +2535,6 @@ static void btrfs_read_locked_inode(struct inode *inode)
BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item);

alloc_group_block = btrfs_inode_block_group(leaf, inode_item);
if (location.objectid == BTRFS_FREE_SPACE_OBJECTID)
inode->i_mapping->flags &= ~__GFP_FS;

/*
* try to precache a NULL acl entry for files that don't have
Expand Down

0 comments on commit adae52b

Please sign in to comment.