aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index f516619a3744..36176018b4b4 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1127,7 +1127,6 @@ static int ocfs2_check_range_for_holes(struct inode *inode, loff_t pos,
1127 size_t count) 1127 size_t count)
1128{ 1128{
1129 int ret = 0; 1129 int ret = 0;
1130 unsigned int extent_flags;
1131 u32 cpos, clusters, extent_len, phys_cpos; 1130 u32 cpos, clusters, extent_len, phys_cpos;
1132 struct super_block *sb = inode->i_sb; 1131 struct super_block *sb = inode->i_sb;
1133 1132
@@ -1135,14 +1134,13 @@ static int ocfs2_check_range_for_holes(struct inode *inode, loff_t pos,
1135 clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos; 1134 clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos;
1136 1135
1137 while (clusters) { 1136 while (clusters) {
1138 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len, 1137 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len);
1139 &extent_flags);
1140 if (ret < 0) { 1138 if (ret < 0) {
1141 mlog_errno(ret); 1139 mlog_errno(ret);
1142 goto out; 1140 goto out;
1143 } 1141 }
1144 1142
1145 if (phys_cpos == 0 || (extent_flags & OCFS2_EXT_UNWRITTEN)) { 1143 if (phys_cpos == 0) {
1146 ret = 1; 1144 ret = 1;
1147 break; 1145 break;
1148 } 1146 }