diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2011-03-31 11:43:23 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-05 07:19:43 +0200 |
commit | adae52b94e18afa1f84fab67df2a8a872c2f5533 (patch) | |
tree | fb9259b9eac14ac950d127faf1788392081010b0 /fs/btrfs/free-space-cache.c | |
parent | Btrfs: fix memory leak in start_transaction() (diff) | |
download | linux-adae52b94e18afa1f84fab67df2a8a872c2f5533.tar.xz linux-adae52b94e18afa1f84fab67df2a8a872c2f5533.zip |
btrfs: clear __GFP_FS flag in the space cache inode
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 <miaox@cn.fujitsu.com>
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 0037427d8a9d..13575de85543 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -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); |