git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs: clear space cache inode generation always
[pandora-kernel.git]
/
fs
/
btrfs
/
extent-tree.c
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index
da528f8
..
57c4ad3
100644
(file)
--- a/
fs/btrfs/extent-tree.c
+++ b/
fs/btrfs/extent-tree.c
@@
-2759,13
+2759,6
@@
again:
goto again;
}
goto again;
}
- /* We've already setup this transaction, go ahead and exit */
- if (block_group->cache_generation == trans->transid &&
- i_size_read(inode)) {
- dcs = BTRFS_DC_SETUP;
- goto out_put;
- }
-
/*
* We want to set the generation to 0, that way if anything goes wrong
* from here on out we know not to trust this cache when we load up next
/*
* We want to set the generation to 0, that way if anything goes wrong
* from here on out we know not to trust this cache when we load up next
@@
-2775,6
+2768,13
@@
again:
ret = btrfs_update_inode(trans, root, inode);
WARN_ON(ret);
ret = btrfs_update_inode(trans, root, inode);
WARN_ON(ret);
+ /* We've already setup this transaction, go ahead and exit */
+ if (block_group->cache_generation == trans->transid &&
+ i_size_read(inode)) {
+ dcs = BTRFS_DC_SETUP;
+ goto out_put;
+ }
+
if (i_size_read(inode) > 0) {
ret = btrfs_truncate_free_space_cache(root, trans, path,
inode);
if (i_size_read(inode) > 0) {
ret = btrfs_truncate_free_space_cache(root, trans, path,
inode);