diff options
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 43527fd78825..56b8522d5767 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -234,8 +234,17 @@ static inline int btrfs_inode_in_log(struct inode *inode, u64 generation) | |||
234 | BTRFS_I(inode)->last_sub_trans <= | 234 | BTRFS_I(inode)->last_sub_trans <= |
235 | BTRFS_I(inode)->last_log_commit && | 235 | BTRFS_I(inode)->last_log_commit && |
236 | BTRFS_I(inode)->last_sub_trans <= | 236 | BTRFS_I(inode)->last_sub_trans <= |
237 | BTRFS_I(inode)->root->last_log_commit) | 237 | BTRFS_I(inode)->root->last_log_commit) { |
238 | return 1; | 238 | /* |
239 | * After a ranged fsync we might have left some extent maps | ||
240 | * (that fall outside the fsync's range). So return false | ||
241 | * here if the list isn't empty, to make sure btrfs_log_inode() | ||
242 | * will be called and process those extent maps. | ||
243 | */ | ||
244 | smp_mb(); | ||
245 | if (list_empty(&BTRFS_I(inode)->extent_tree.modified_extents)) | ||
246 | return 1; | ||
247 | } | ||
239 | return 0; | 248 | return 0; |
240 | } | 249 | } |
241 | 250 | ||