aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/extent_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/extent_map.c')
-rw-r--r--fs/ocfs2/extent_map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index 2487116d0d33..4bf2b763467f 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -852,20 +852,20 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int whence)
852 852
853 down_read(&OCFS2_I(inode)->ip_alloc_sem); 853 down_read(&OCFS2_I(inode)->ip_alloc_sem);
854 854
855 if (*offset >= inode->i_size) { 855 if (*offset >= i_size_read(inode)) {
856 ret = -ENXIO; 856 ret = -ENXIO;
857 goto out_unlock; 857 goto out_unlock;
858 } 858 }
859 859
860 if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { 860 if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
861 if (whence == SEEK_HOLE) 861 if (whence == SEEK_HOLE)
862 *offset = inode->i_size; 862 *offset = i_size_read(inode);
863 goto out_unlock; 863 goto out_unlock;
864 } 864 }
865 865
866 clen = 0; 866 clen = 0;
867 cpos = *offset >> cs_bits; 867 cpos = *offset >> cs_bits;
868 cend = ocfs2_clusters_for_bytes(inode->i_sb, inode->i_size); 868 cend = ocfs2_clusters_for_bytes(inode->i_sb, i_size_read(inode));
869 869
870 while (cpos < cend && !is_last) { 870 while (cpos < cend && !is_last) {
871 ret = ocfs2_get_clusters_nocache(inode, di_bh, cpos, &hole_size, 871 ret = ocfs2_get_clusters_nocache(inode, di_bh, cpos, &hole_size,
@@ -904,8 +904,8 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int whence)
904 extlen = clen; 904 extlen = clen;
905 extlen <<= cs_bits; 905 extlen <<= cs_bits;
906 906
907 if ((extoff + extlen) > inode->i_size) 907 if ((extoff + extlen) > i_size_read(inode))
908 extlen = inode->i_size - extoff; 908 extlen = i_size_read(inode) - extoff;
909 extoff += extlen; 909 extoff += extlen;
910 if (extoff > *offset) 910 if (extoff > *offset)
911 *offset = extoff; 911 *offset = extoff;