diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-06-25 22:01:31 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 17:04:04 +0200 |
commit | 1b1e2135dc1e4efbcf25ac9ac9979316d4e1193e (patch) | |
tree | 2af53ed5d4c368bbefd9de94f0adc2902a785468 /fs/btrfs/ordered-data.c | |
parent | Btrfs: Change find_extent_buffer to use TestSetPageLocked (diff) | |
download | linux-1b1e2135dc1e4efbcf25ac9ac9979316d4e1193e.tar.xz linux-1b1e2135dc1e4efbcf25ac9ac9979316d4e1193e.zip |
Btrfs: Add a per-inode csum mutex to avoid races creating csum items
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 5e4c0d95ce43..254da8225664 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -152,12 +152,13 @@ int btrfs_add_ordered_inode(struct inode *inode) inode->i_ino, &entry->rb_node); BTRFS_I(inode)->ordered_trans = transid; + if (!node) + igrab(inode); write_unlock(&tree->lock); + if (node) kfree(entry); - else - igrab(inode); return 0; } |