diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-01-29 10:11:59 +0000 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 12:59:06 -0500 |
commit | df0af1a57f72c74d53a9377c60ff20095afab97d (patch) | |
tree | 588048ea16f8564a2eb449c0e9b7ba22c49eebc6 /fs/btrfs/disk-io.c | |
parent | 963d678b0f7649300e3a67f2513ca9d830c6e303 (diff) | |
download | lwn-df0af1a57f72c74d53a9377c60ff20095afab97d.tar.gz lwn-df0af1a57f72c74d53a9377c60ff20095afab97d.zip |
Btrfs: use the inode own lock to protect its delalloc_bytes
We need not use a global lock to protect the delalloc_bytes of the
inode, just use its own lock. In this way, we can reduce the lock
contention and ->delalloc_lock will just protect delalloc inode
list.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 2c9498aefe86..11f6dbcb1191 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3690,6 +3690,8 @@ static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root) delalloc_inodes); list_del_init(&btrfs_inode->delalloc_inodes); + clear_bit(BTRFS_INODE_IN_DELALLOC_LIST, + &btrfs_inode->runtime_flags); btrfs_invalidate_inodes(btrfs_inode->root); } |