]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/btrfs/ordered-data.c
Btrfs: fix possible stale data exposure
[~shefty/rdma-dev.git] / fs / btrfs / ordered-data.c
index fc6840b53d9d0f70bdefe376cabc95e521e3e320..e5ed56729607a82246cac22a229d105efa562509 100644 (file)
@@ -877,7 +877,7 @@ int btrfs_ordered_update_i_size(struct inode *inode, u64 offset,
                        break;
                if (test->file_offset >= i_size)
                        break;
-               if (test->file_offset >= disk_i_size) {
+               if (entry_end(test) > disk_i_size) {
                        /*
                         * we don't update disk_i_size now, so record this
                         * undealt i_size. Or we will not know the real